update nodes and roles