Description of problem: If you mistakenly run the undercloud install as root, it all runs and then fails at the last step (probably a non-critical failure, but it's not a great user experience) Version-Release number of selected component (if applicable): instack-undercloud-2.1.2-21.el7ost.noarch instack-0.0.7-1.el7ost.noarch How reproducible: Always Steps to Reproduce: 1. Follow the docs, but forget to su - stack before doing the undercloud install Actual results: [2015-07-17 09:58:42,373] (os-refresh-config) [INFO] Completed phase post-configure os-refresh-config completed successfully Copy stackrc failed: cp: ‘/root/stackrc’ and ‘/root/stackrc’ are the same file Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 527, in install _configure_ssh_keys() File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 491, in _configure_ssh_keys _run_command(args, name='Copy stackrc') File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 274, in _run_command env=env) File "/usr/lib64/python2.7/subprocess.py", line 575, in check_output raise CalledProcessError(retcode, cmd, output=output) subprocess.CalledProcessError: Command '['sudo', 'cp', '/root/stackrc', '/root']' returned non-zero exit status 1 ERROR: openstack Command 'instack-install-undercloud' returned non-zero exit status 1 Expected results: Either we should error at the start saying don't do this as root, or we should tolerate it and not fail copying files at the end. Additional info:
Created attachment 1053099 [details] install undercloud log
Actually this appears to be hard to recover from - keystone appears misconfigured (I assume some stuff gets created/installed with wrong perms), so sourcing stackrc doesn't result in a working config. Also re-running the install as stack fails (log attached). So, I think the best plan is to fail at the start if the user is root.
Created attachment 1053107 [details] Stack user install log (after running as root)
*** This bug has been marked as a duplicate of bug 1239088 ***