Description of problem: $ cat undercloud_install.log ... + '[' -x /usr/sbin/semanage ']' 10:08:16 + mkdir -p /opt/stack/selinux-policy 10:08:16 ++ dirname /tmp/tmpoAwezY/post-install.d/86-selinux 10:08:16 + checkmodule -M -m -o /tmp/ipxe.mod /tmp/tmpoAwezY/post-install.d/../selinux/ipxe.te 10:08:16 checkmodule: Module name ironic-ipxe is different than the output base filename ipxe 10:08:16 checkmodule: loading policy configuration from /tmp/tmpoAwezY/post-install.d/../selinux/ipxe.te 10:08:16 INFO: 2016-10-17 06:08:11,747 -- ############### End stdout/stderr logging ############### 10:08:16 ERROR: 2016-10-17 06:08:11,747 -- Hook FAILED. 10:08:16 ERROR: 2016-10-17 06:08:11,747 -- Failed running command ['dib-run-parts', u'/tmp/tmpoAwezY/post-install.d'] 10:08:16 File "/usr/lib/python2.7/site-packages/instack/main.py", line 163, in main 10:08:16 em.run() 10:08:16 File "/usr/lib/python2.7/site-packages/instack/runner.py", line 79, in run 10:08:16 self.run_hook(hook) 10:08:16 File "/usr/lib/python2.7/site-packages/instack/runner.py", line 174, in run_hook 10:08:16 raise Exception("Failed running command %s" % command) 10:08:16 ERROR: 2016-10-17 06:08:11,747 -- None 10:08:16 Traceback (most recent call last): 10:08:16 File "<string>", line 1, in <module> 10:08:16 File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 519, in install 10:08:16 _run_instack(instack_env) 10:08:16 File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 454, in _run_instack 10:08:16 _run_live_command(args, instack_env, 'instack') 10:08:16 File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 297, in _run_live_command 10:08:16 raise RuntimeError('%s failed. See log for details.', name) 10:08:16 RuntimeError: ('%s failed. See log for details.', 'instack') 10:08:16 ERROR: openstack Command 'instack-install-undercloud' returned non-zero exit status 1 10:08:16 Traceback (most recent call last): 10:08:16 File "/usr/lib/python2.7/site-packages/cliff/app.py", line 295, in run_subcommand 10:08:16 result = cmd.run(parsed_args) 10:08:16 File "/usr/lib/python2.7/site-packages/cliff/command.py", line 53, in run 10:08:16 self.take_action(parsed_args) 10:08:16 File "/usr/lib/python2.7/site-packages/rdomanager_oscplugin/v1/undercloud.py", line 33, in take_action 10:08:16 subprocess.check_call("instack-install-undercloud") 10:08:16 File "/usr/lib64/python2.7/subprocess.py", line 542, in check_call 10:08:16 raise CalledProcessError(retcode, cmd) 10:08:16 CalledProcessError: Command 'instack-install-undercloud' returned non-zero exit status 1 10:08:16 DEBUG: openstackclient.shell clean_up InstallPlugin 10:08:16 DEBUG: openstackclient.shell got an error: Command 'instack-install-undercloud' returned non-zero exit status 1 10:08:16 ERROR: openstackclient.shell Traceback (most recent call last): 10:08:16 File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 176, in run 10:08:16 return super(OpenStackShell, self).run(argv) 10:08:16 File "/usr/lib/python2.7/site-packages/cliff/app.py", line 230, in run 10:08:16 result = self.run_subcommand(remainder) 10:08:16 File "/usr/lib/python2.7/site-packages/cliff/app.py", line 295, in run_subcommand 10:08:16 result = cmd.run(parsed_args) 10:08:16 File "/usr/lib/python2.7/site-packages/cliff/command.py", line 53, in run 10:08:16 self.take_action(parsed_args) 10:08:16 File "/usr/lib/python2.7/site-packages/rdomanager_oscplugin/v1/undercloud.py", line 33, in take_action 10:08:16 subprocess.check_call("instack-install-undercloud") 10:08:16 File "/usr/lib64/python2.7/subprocess.py", line 542, in check_call 10:08:16 raise CalledProcessError(retcode, cmd) 10:08:16 CalledProcessError: Command 'instack-install-undercloud' returned non-zero exit status 1
Version-Release number of selected component (if applicable): OSPd7-9
Steps to reproduce: 1) Download RHEL-7.3 RC2 e.g. from http://rhos-qe-mirror-tlv.usersys.redhat.com/rel-eng/RHEL-7.3-RC-2.0/compose/Server/x86_64/images/rhel-guest-image-7.3-32.x86_64.qcow2 and use as base image for undercloud installation
2) $ cat undercloud.conf [DEFAULT] # Network interface on the Undercloud that will be handling the PXE # boots and DHCP for Overcloud instances. (string value) local_interface = eth0
3)$ cat undercloud_deploy.sh #!/bin/bash openstack undercloud install --debug &> undercloud_install.log
4)$ sh undercloud_deploy.sh # Fails with error above and return value "1"
Expected results: installation will pass
Additional info: It seems the problem is related to selinux policies, related files:
$ cat /tmp/tmpoAwezY/post-install.d/86-selinux #!/bin/bash set -eux set -o pipefail
# Install the selinux policy [ -x /usr/sbin/semanage ] || exit 0
mkdir -p /opt/stack/selinux-policy
# Compile the selinux policy checkmodule -M -m -o /tmp/ipxe.mod $(dirname $0)/../selinux/ipxe.te sudo semodule_package -m /tmp/ipxe.mod -o /opt/stack/selinux-policy/ipxe.pp
Description of problem: install. log selinux- policy post-install. d/86-selinux post-install. d/../selinux/ ipxe.te post-install. d/../selinux/ ipxe.te tmpoAwezY/ post-install. d'] python2. 7/site- packages/ instack/ main.py" , line 163, in main python2. 7/site- packages/ instack/ runner. py", line 79, in run python2. 7/site- packages/ instack/ runner. py", line 174, in run_hook python2. 7/site- packages/ instack_ undercloud/ undercloud. py", line 519, in install instack_ env) python2. 7/site- packages/ instack_ undercloud/ undercloud. py", line 454, in _run_instack command( args, instack_env, 'instack') python2. 7/site- packages/ instack_ undercloud/ undercloud. py", line 297, in _run_live_command install- undercloud' returned non-zero exit status 1 python2. 7/site- packages/ cliff/app. py", line 295, in run_subcommand parsed_ args) python2. 7/site- packages/ cliff/command. py", line 53, in run action( parsed_ args) python2. 7/site- packages/ rdomanager_ oscplugin/ v1/undercloud. py", line 33, in take_action check_call( "instack- install- undercloud" ) python2. 7/subprocess. py", line 542, in check_call ror(retcode, cmd) install- undercloud' returned non-zero exit status 1 .shell clean_up InstallPlugin .shell got an error: Command 'instack- install- undercloud' returned non-zero exit status 1 .shell Traceback (most recent call last): python2. 7/site- packages/ openstackclient /shell. py", line 176, in run Shell, self).run(argv) python2. 7/site- packages/ cliff/app. py", line 230, in run subcommand( remainder) python2. 7/site- packages/ cliff/app. py", line 295, in run_subcommand parsed_ args) python2. 7/site- packages/ cliff/command. py", line 53, in run action( parsed_ args) python2. 7/site- packages/ rdomanager_ oscplugin/ v1/undercloud. py", line 33, in take_action check_call( "instack- install- undercloud" ) python2. 7/subprocess. py", line 542, in check_call ror(retcode, cmd) install- undercloud' returned non-zero exit status 1
$ cat undercloud_
...
+ '[' -x /usr/sbin/semanage ']'
10:08:16 + mkdir -p /opt/stack/
10:08:16 ++ dirname /tmp/tmpoAwezY/
10:08:16 + checkmodule -M -m -o /tmp/ipxe.mod /tmp/tmpoAwezY/
10:08:16 checkmodule: Module name ironic-ipxe is different than the output base filename ipxe
10:08:16 checkmodule: loading policy configuration from /tmp/tmpoAwezY/
10:08:16 INFO: 2016-10-17 06:08:11,747 -- ############### End stdout/stderr logging ###############
10:08:16 ERROR: 2016-10-17 06:08:11,747 -- Hook FAILED.
10:08:16 ERROR: 2016-10-17 06:08:11,747 -- Failed running command ['dib-run-parts', u'/tmp/
10:08:16 File "/usr/lib/
10:08:16 em.run()
10:08:16 File "/usr/lib/
10:08:16 self.run_hook(hook)
10:08:16 File "/usr/lib/
10:08:16 raise Exception("Failed running command %s" % command)
10:08:16 ERROR: 2016-10-17 06:08:11,747 -- None
10:08:16 Traceback (most recent call last):
10:08:16 File "<string>", line 1, in <module>
10:08:16 File "/usr/lib/
10:08:16 _run_instack(
10:08:16 File "/usr/lib/
10:08:16 _run_live_
10:08:16 File "/usr/lib/
10:08:16 raise RuntimeError('%s failed. See log for details.', name)
10:08:16 RuntimeError: ('%s failed. See log for details.', 'instack')
10:08:16 ERROR: openstack Command 'instack-
10:08:16 Traceback (most recent call last):
10:08:16 File "/usr/lib/
10:08:16 result = cmd.run(
10:08:16 File "/usr/lib/
10:08:16 self.take_
10:08:16 File "/usr/lib/
10:08:16 subprocess.
10:08:16 File "/usr/lib64/
10:08:16 raise CalledProcessEr
10:08:16 CalledProcessError: Command 'instack-
10:08:16 DEBUG: openstackclient
10:08:16 DEBUG: openstackclient
10:08:16 ERROR: openstackclient
10:08:16 File "/usr/lib/
10:08:16 return super(OpenStack
10:08:16 File "/usr/lib/
10:08:16 result = self.run_
10:08:16 File "/usr/lib/
10:08:16 result = cmd.run(
10:08:16 File "/usr/lib/
10:08:16 self.take_
10:08:16 File "/usr/lib/
10:08:16 subprocess.
10:08:16 File "/usr/lib64/
10:08:16 raise CalledProcessEr
10:08:16 CalledProcessError: Command 'instack-
Version-Release number of selected component (if applicable):
OSPd7-9
Steps to reproduce: rhos-qe- mirror- tlv.usersys. redhat. com/rel- eng/RHEL- 7.3-RC- 2.0/compose/ Server/ x86_64/ images/ rhel-guest- image-7. 3-32.x86_ 64.qcow2 and use as base image for undercloud installation
1) Download RHEL-7.3 RC2 e.g. from http://
2) $ cat undercloud.conf
[DEFAULT]
# Network interface on the Undercloud that will be handling the PXE
# boots and DHCP for Overcloud instances. (string value)
local_interface = eth0
3)$ cat undercloud_ deploy. sh install. log
#!/bin/bash
openstack undercloud install --debug &> undercloud_
4)$ sh undercloud_ deploy. sh
# Fails with error above and return value "1"
Expected results:
installation will pass
Additional info:
It seems the problem is related to selinux policies, related files:
$ cat /tmp/tmpoAwezY/ post-install. d/86-selinux
#!/bin/bash
set -eux
set -o pipefail
# Install the selinux policy
[ -x /usr/sbin/semanage ] || exit 0
mkdir -p /opt/stack/ selinux- policy
# Compile the selinux policy selinux/ ipxe.te selinux- policy/ ipxe.pp
checkmodule -M -m -o /tmp/ipxe.mod $(dirname $0)/../
sudo semodule_package -m /tmp/ipxe.mod -o /opt/stack/