Hide Forgot
Documentation: https://access.redhat.com/documentation/en/red-hat-openstack-platform/9/single/director-installation-and-usage/#sect-Migrating_VMs_from_an_Overcloud_Compute_Node The documentation in the link says: Log into each Compute node as the nova user and run the following script to set up the keys: NOVA_SSH=/var/lib/nova/.ssh mkdir ${NOVA_SSH} cp nova_id_rsa ${NOVA_SSH}/id_rsa chmod 600 ${NOVA_SSH}/id_rsa cp nova_id_rsa.pub ${NOVA_SSH}/id_rsa.pub cp nova_id_rsa.pub ${NOVA_SSH}/authorized_keys chown -R nova.nova ${NOVA_SSH} # enable login for nova user on compute hosts: usermod -s /bin/bash nova # add ssh keys of overcloud nodes into known hosts: ssh-keyscan -t rsa `os-apply-config --key hosts --type raw --key-default '' | awk '{print $1}'` >> /etc/ssh/ssh_known_hosts But running usermod and appending lines to /etc/ssh/ssh_known_hosts requires root (or explicit permissions) ./migrat_prep.sh: line 13: /usr/sbin/usermod: Permission denied Traceback (most recent call last): File "/bin/os-apply-config", line 10, in <module> sys.exit(main()) File "/usr/lib/python2.7/site-packages/os_apply_config/apply_config.py", line 335, in main opts.metadata = load_list_from_json(opts.os_config_files) File "/usr/lib/python2.7/site-packages/os_apply_config/apply_config.py", line 318, in load_list_from_json with open(json_file) as ocf: IOError: [Errno 13] Permission denied: '/var/lib/os-collect-config/os_config_files.json' ./migrat_prep.sh: line 16: /etc/ssh/ssh_known_hosts: Permission denied Thanks.
same goes for the line with: os-apply-config --key hosts --type raw --key-default '' Needs root.
Also note the following behavior: [root@overcloud-compute-0 ~]# ssh-keyscan -t rsa `os-apply-config --key hosts --type raw --key-default '' | awk '{print $1}'` getaddrinfo \\n192.168.100.13: Name or service not known
Here's a link to upstream doc: http://docs.openstack.org/admin-guide/cli-nova-migrate-cfg-ssh.html
*** Bug 1395756 has been marked as a duplicate of this bug. ***
So I'm revamping the procedure and script. I'm going to try and provide a script they can execute from the Undercloud instead of on each Compute node. BZ#1395756 also pointed out how illogical it is to ask the user to login as the nova user to run the script, but the script contains a command to enable bash usage for the nova user.
The new script and procedure has been pushed to OSP10 and OSP9. Here's the OSP10 live version: https://access.redhat.com/documentation/en/red-hat-openstack-platform/10/single/director-installation-and-usage/#sect-Migrating_VMs_from_an_Overcloud_Compute_Node Closing this BZ, but feel free to reopen if further changes are required.