Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1344365 - Undercloud installation fails when reaching 'pki_initialization'
Summary: Undercloud installation fails when reaching 'pki_initialization'
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: instack-undercloud
Version: 7.0 (Kilo)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: James Slagle
QA Contact: Arik Chernetsky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-09 13:29 UTC by Arie Bregman
Modified: 2016-08-02 13:35 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-13 08:10:33 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 350004 0 None None None 2016-08-02 13:35:27 UTC

Description Arie Bregman 2016-06-09 13:29:59 UTC
Description of problem:

Undercloud installation fails with the following error: "[Command '['dib-run-parts', '/usr/libexec/os-refresh-config/post-configure.d']' returned non-zero exit status 1]"

Version-Release number of selected component (if applicable): 7


How reproducible: 100%

Steps to Reproduce:
1. Install latest puddle repo
2. Install undercloud

Actual results:

PKI initialization in init-keystone is deprecated and will be removed.
Traceback (most recent call last):
  File "/bin/init-keystone", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/os_cloud_config/cmd/init_keystone.py", line 88, in main
    args.user, args.timeout, args.pollinterval, args.pkisetup)
  File "/usr/lib/python2.7/site-packages/os_cloud_config/keystone.py", line 158, in initialize
    _perform_pki_initialization(host, user)
  File "/usr/lib/python2.7/site-packages/os_cloud_config/keystone.py", line 537, in _perform_pki_initialization
    "$(getent group | grep '^keystone' | cut -d: -f1)"])
  File "/usr/lib64/python2.7/subprocess.py", line 542, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ssh', '-oStrictHostKeyChecking=no', '-t', '-l', 'root', '192.0.2.1', 'sudo', 'keystone-manage', 'pki_setup', '--keystone-user', "$(getent passwd | grep '^keystone' | cut -d: -f1)", '--keystone-group', "$(getent group | grep '^keystone' | cut -d: -f1)"]' returned non-zero exit status 1
[2016-06-09 09:08:21,942] (os-refresh-config) [ERROR] during post-configure phase. [Command '['dib-run-parts', '/usr/libexec/os-refresh-config/post-configure.d']' returned non-zero exit status 1]

Expected results: Undercloud installation completed successfully

Additional info:

My undercloud.conf

DEFAULT]
local_ip = 192.0.2.1/24
undercloud_public_vip = 192.0.2.2
undercloud_admin_vip = 192.0.2.3
local_interface=eth1
masquerade_network = 192.0.2.0/24
dhcp_start = 192.0.2.5
dhcp_end = 192.0.2.24
network_cidr = 192.0.2.0/24
network_gateway = 192.0.2.1
discovery_iprange = 192.0.2.100,192.0.2.120

Comment 3 Steve Baker 2016-06-13 00:45:33 UTC
I just hit this on RHOS-8 - I assume its a tty issue because I'm running "openstack undercloud install" remotely via ansible.

My workaround was the following ansible task, run before "openstack undercloud install"

- name: sudoers no tty
  become: yes
  lineinfile: dest=/etc/sudoers state=absent regexp='Defaults\s+requiretty'

Comment 4 Arie Bregman 2016-06-13 08:10:33 UTC
@Steve thanks, it fixed the issue for me. I wonder why it started to fail only now, after using the same image and automated installation for weeks. Also happens only for osp 7, although I'm using the same Ansible tasks for 8 and 9 releases.

Closing the "bug".

Comment 5 Steve Baker 2016-06-13 21:14:47 UTC
It happened for me in 8, there might be a different PKI setup method in 9, since 8 posts a deprecation message.


Note You need to log in before you can comment on or make changes to this bug.