update nodes and hosts