Undercloud deployment fails when I execute command “openstack undercloud install”

Solution Verified - Updated -


  • How to setup the stack user for undercloud install
  • sudo permissions error when installing undercloud
  • When execute command openstack undercloud install, report error as below:

    [stack@director ~]$ openstack undercloud install
    Logging to /home/stack/.instack/install-undercloud.log
    Checking for a FQDN hostname...
    [sudo] password for stack: 
    hostnamectl failed: stack is not in the sudoers file.  This incident will be reported.
    Traceback (most recent call last):
     File "<string>", line 1, in <module>
     File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 517, in install
     File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 309, in _check_hostname
       detected_static_hostname = _run_command(args, name='hostnamectl').rstrip()
     File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 274, in _run_command
     File "/usr/lib64/python2.7/subprocess.py", line 575, in check_output
       raise CalledProcessError(retcode, cmd, output=output)
    subprocess.CalledProcessError: Command '['sudo', 'hostnamectl', '--static']' returned non-zero exit status 1
    ERROR: openstack Command 'instack-install-undercloud' returned non-zero exit status 1
    [stack@director ~]$ 


  • Red Hat OpenStack Platform 8.0
  • Red Hat OpenStack Platform 7.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content