Bug 1203744 - [rhel7.0] - Keystone doesn't give token when configuring httpd to run keystone and Horizon communication over https
Summary: [rhel7.0] - Keystone doesn't give token when configuring httpd to run keyston...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-keystone
Version: 6.0 (Juno)
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: z2
: 6.0 (Juno)
Assignee: Nathan Kinder
QA Contact: Mike Abrams
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-19 15:06 UTC by Ido Ovadia
Modified: 2016-04-26 17:44 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-24 14:00:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
keystone.log (86.06 KB, text/plain)
2015-03-22 15:28 UTC, Ido Ovadia
no flags Details
keystone_wsgi_admin_access.log (1.82 KB, text/plain)
2015-03-22 15:29 UTC, Ido Ovadia
no flags Details
keystone_wsgi_admin_error.log (28.29 KB, text/plain)
2015-03-22 15:30 UTC, Ido Ovadia
no flags Details
keystone_wsgi_main_access.log (430 bytes, text/plain)
2015-03-22 15:30 UTC, Ido Ovadia
no flags Details
keystone_wsgi_main_error.log (7.92 KB, text/plain)
2015-03-22 15:31 UTC, Ido Ovadia
no flags Details
openstack-setup.log (7.10 KB, text/plain)
2015-03-22 15:31 UTC, Ido Ovadia
no flags Details
Lon's answer file (29.42 KB, text/plain)
2015-03-23 15:04 UTC, Lon Hohberger
no flags Details
audit2allow output (6.78 KB, text/plain)
2015-03-24 10:50 UTC, Ido Ovadia
no flags Details

Description Ido Ovadia 2015-03-19 15:06:44 UTC
Description of problem:
=======================
When using Packstack to install RHOS6 AIO over RHEL7 with SSL enabled Horizon and AMQP and HTTPD to run Keystone, keystone failed to give token.

PuppetError: Error appeared during Puppet run: 10.35.160.117_keystone.pp
Error: /Stage[main]/Neutron::Keystone::Auth/Keystone_service[neutron]: Could not evaluate: Execution of '/usr/bin/openstack service list --quiet --format csv --long --os-token 43fab2a4be3443cd876aa79ae56c7760 --os-url http://127.0.0.1:35357/v2.0/' returned 1: ERROR: openstack Internal Server Error (HTTP 500)


Version-Release number of selected component (if applicable):
=============================================================
openstack-packstack-puppet-2014.2-0.17.dev1462.gbb05296.el7ost.noarch
openstack-packstack-2014.2-0.17.dev1462.gbb05296.el7ost.noarch
python-keystone-2014.2.2-1.el7ost.noarch
python-keystoneclient-0.11.1-1.el7ost.noarch
python-keystonemiddleware-1.2.0-2.el7ost.noarch
openstack-keystone-2014.2.2-1.el7ost.noarch

How reproducible:
=================
100%

Steps to Reproduce:
===================
1. Generate answer file, other than usual setting (attached answer file) set    these three:
  CONFIG_AMQP_ENABLE_SSL=y
  CONFIG_HORIZON_SSL=y
  CONFIG_KEYSTONE_SERVICE_NAME=httpd
2. Run packstack with answer file

Actual results:
===============
Installation failed and keystone doesn't gives token  

Expected results:
=================
Installation pass successfully and keystone gives token

Additional info:
===============
PuppetError: Error appeared during Puppet run: 10.35.160.117_keystone.pp
Error: /Stage[main]/Neutron::Keystone::Auth/Keystone_service[neutron]: Could not evaluate: Execution of '/usr/bin/openstack service list --quiet --format csv --long --os-token 43fab2a4be3443cd876aa79ae56c7760 --os-url http://127.0.0.1:35357/v2.0/' returned 1: ERROR: openstack Internal Server Error (HTTP 500)=

Comment 4 Rich Megginson 2015-03-20 18:05:50 UTC
Do you still have this system that I can log into?
Can you attach the packstack keystone logs from /var/tmp/packstack?
Can you attach the /var/log/keystone/keystone.log and the /var/log/httpd/*keystone* files?

Comment 5 Ido Ovadia 2015-03-22 15:13:25 UTC
Reproduce again, and now without enabling SSL for AMQP 
===============================================================

Version-Release number of selected component
============================================
openstack-packstack-puppet-2014.2-0.18.dev1462.gbb05296.el7ost.noarch
openstack-packstack-2014.2-0.18.dev1462.gbb05296.el7ost.noarch
python-keystonemiddleware-1.2.0-2.el7ost.noarch
openstack-keystone-2014.2.2-1.el7ost.noarch
python-keystone-2014.2.2-1.el7ost.noarch
python-keystoneclient-0.11.1-1.el7ost.noarch

Steps to Reproduce:
===================
1. Generate answer file, other than usual setting (attached answer file) set    these two:
  CONFIG_HORIZON_SSL=y
  CONFIG_KEYSTONE_SERVICE_NAME=httpd    -----> default
2. Run packstack with answer file

Result
======
Same fail

Additional info:
===============
logs are enclosed

Comment 6 Ido Ovadia 2015-03-22 15:28:40 UTC
Created attachment 1005063 [details]
keystone.log

Comment 7 Ido Ovadia 2015-03-22 15:29:42 UTC
Created attachment 1005064 [details]
keystone_wsgi_admin_access.log

Comment 8 Ido Ovadia 2015-03-22 15:30:11 UTC
Created attachment 1005065 [details]
keystone_wsgi_admin_error.log

Comment 9 Ido Ovadia 2015-03-22 15:30:33 UTC
Created attachment 1005066 [details]
keystone_wsgi_main_access.log

Comment 10 Ido Ovadia 2015-03-22 15:31:05 UTC
Created attachment 1005067 [details]
keystone_wsgi_main_error.log

Comment 11 Ido Ovadia 2015-03-22 15:31:36 UTC
Created attachment 1005068 [details]
openstack-setup.log

Comment 12 Jamie Lennox 2015-03-23 04:39:45 UTC
I reproduced it. It appears the issue is a selinux one, when i setenforce 0 i get passed this. I say appears because now i get the error: 

Error: Package: 10:qemu-kvm-rhev-2.1.2-23.el7.x86_64 (RH7-RHOS-6.0)
           Requires: glusterfs-api >= 3.6.0
           Installed: glusterfs-api-3.4.0.59rhs-1.el7.centos.x86_64 (@base)
               glusterfs-api = 3.4.0.59rhs-1.el7.centos
Error: Package: 10:qemu-kvm-rhev-2.1.2-23.el7.x86_64 (RH7-RHOS-6.0)
           Requires: seabios-bin >= 1.7.5-1
           Available: seabios-bin-1.7.2.2-12.el7.x86_64 (base)
               seabios-bin = 1.7.2.2-12.el7
           Available: seabios-bin-1.7.2.2-12.el7_0.1.x86_64 (updates)
               seabios-bin = 1.7.2.2-12.el7_0.1

When installing openstack-nova-compute

Comment 18 Lon Hohberger 2015-03-23 15:00:10 UTC
So, I did:

  setenforce 1
  keystone token-get

and then:

  /usr/bin/openstack service list --quiet --format csv --long --os-token [token id] --os-url http://127.0.0.1:35357/v2.0/

There were no AVCs, but I installed in permissive mode.  I will retry with a boot from enforcing, and following that, an install in enforcing.

Comment 19 Lon Hohberger 2015-03-23 15:02:08 UTC
Reboot and could still get a token and run the service list command.  Will try clean reinstall in enforcing mode.

Comment 20 Lon Hohberger 2015-03-23 15:04:28 UTC
Created attachment 1005444 [details]
Lon's answer file

Comment 21 Rich Megginson 2015-03-23 15:08:46 UTC
(In reply to Ido Ovadia from comment #5)
> Reproduce again, and now without enabling SSL for AMQP 
> ===============================================================
> 
> Version-Release number of selected component
> ============================================
> openstack-packstack-puppet-2014.2-0.18.dev1462.gbb05296.el7ost.noarch
> openstack-packstack-2014.2-0.18.dev1462.gbb05296.el7ost.noarch
> python-keystonemiddleware-1.2.0-2.el7ost.noarch
> openstack-keystone-2014.2.2-1.el7ost.noarch
> python-keystone-2014.2.2-1.el7ost.noarch
> python-keystoneclient-0.11.1-1.el7ost.noarch
> 
> Steps to Reproduce:
> ===================
> 1. Generate answer file, other than usual setting (attached answer file) set
> these two:
>   CONFIG_HORIZON_SSL=y
>   CONFIG_KEYSTONE_SERVICE_NAME=httpd    -----> default
> 2. Run packstack with answer file
> 
> Result
> ======
> Same fail
> 
> Additional info:
> ===============
> logs are enclosed

This is almost certainly selinux.  Can you provide

# rpm -qa|grep selinux

# audit2allow -w -e -a

Comment 22 Lon Hohberger 2015-03-23 15:28:46 UTC
Clean reinstall in enforcing mode passed, as did a repeat of comment 18.

I can't cause this to occur using packstack in an all-in-one installation as per the answer file provided.  Are there perhaps other options I am missing in the answer file?

Comment 23 Lon Hohberger 2015-03-23 15:30:17 UTC
In my tests:

selinux-policy-3.13.1-23.el7.noarch
selinux-policy-targeted-3.13.1-23.el7.noarch
openstack-selinux-0.6.25-1.el7ost.noarch

Comment 24 Ido Ovadia 2015-03-23 16:22:20 UTC
(In reply to Rich Megginson from comment #21)
> (In reply to Ido Ovadia from comment #5)
> > Reproduce again, and now without enabling SSL for AMQP 
> > ===============================================================
> > 
> > Version-Release number of selected component
> > ============================================
> > openstack-packstack-puppet-2014.2-0.18.dev1462.gbb05296.el7ost.noarch
> > openstack-packstack-2014.2-0.18.dev1462.gbb05296.el7ost.noarch
> > python-keystonemiddleware-1.2.0-2.el7ost.noarch
> > openstack-keystone-2014.2.2-1.el7ost.noarch
> > python-keystone-2014.2.2-1.el7ost.noarch
> > python-keystoneclient-0.11.1-1.el7ost.noarch
> > 
> > Steps to Reproduce:
> > ===================
> > 1. Generate answer file, other than usual setting (attached answer file) set
> > these two:
> >   CONFIG_HORIZON_SSL=y
> >   CONFIG_KEYSTONE_SERVICE_NAME=httpd    -----> default
> > 2. Run packstack with answer file
> > 
> > Result
> > ======
> > Same fail
> > 
> > Additional info:
> > ===============
> > logs are enclosed
> 
> This is almost certainly selinux.  Can you provide
> 
> # rpm -qa|grep selinux
> 
> # audit2allow -w -e -a

selinux-policy-targeted-3.12.1-153.el7_0.13.noarch
selinux-policy-3.12.1-153.el7_0.13.noarch
openstack-selinux-0.6.25-1.el7ost.noarch

Comment 25 Rich Megginson 2015-03-23 17:36:52 UTC
(In reply to Ido Ovadia from comment #24)
> (In reply to Rich Megginson from comment #21)
> > (In reply to Ido Ovadia from comment #5)
> > > Reproduce again, and now without enabling SSL for AMQP 
> > > ===============================================================
> > > 
> > > Version-Release number of selected component
> > > ============================================
> > > openstack-packstack-puppet-2014.2-0.18.dev1462.gbb05296.el7ost.noarch
> > > openstack-packstack-2014.2-0.18.dev1462.gbb05296.el7ost.noarch
> > > python-keystonemiddleware-1.2.0-2.el7ost.noarch
> > > openstack-keystone-2014.2.2-1.el7ost.noarch
> > > python-keystone-2014.2.2-1.el7ost.noarch
> > > python-keystoneclient-0.11.1-1.el7ost.noarch
> > > 
> > > Steps to Reproduce:
> > > ===================
> > > 1. Generate answer file, other than usual setting (attached answer file) set
> > > these two:
> > >   CONFIG_HORIZON_SSL=y
> > >   CONFIG_KEYSTONE_SERVICE_NAME=httpd    -----> default
> > > 2. Run packstack with answer file
> > > 
> > > Result
> > > ======
> > > Same fail
> > > 
> > > Additional info:
> > > ===============
> > > logs are enclosed
> > 
> > This is almost certainly selinux.  Can you provide
> > 
> > # rpm -qa|grep selinux
> > 
> > # audit2allow -w -e -a
> 
> selinux-policy-targeted-3.12.1-153.el7_0.13.noarch
> selinux-policy-3.12.1-153.el7_0.13.noarch
> openstack-selinux-0.6.25-1.el7ost.noarch

That's not the latest policy, and is not the same as what Lon has.  Can you provide the audit2allow messages so we can determine if the selinux issue you are seeing has been fixed in a later policy?

Comment 28 Lon Hohberger 2015-03-23 20:23:08 UTC
RHEL 7.0 doesn't have an EUS stream, so one would need to update to at least the 7.1 selinux policies to make this work.

Comment 29 Ido Ovadia 2015-03-24 10:50:24 UTC
Created attachment 1005797 [details]
audit2allow output

Comment 30 Ido Ovadia 2015-03-24 10:53:03 UTC
(In reply to Rich Megginson from comment #25)

> That's not the latest policy, and is not the same as what Lon has.  Can you
> provide the audit2allow messages so we can determine if the selinux issue
> you are seeing has been fixed in a later policy?
====================================================
New file was enclosed (audit2allow.txt)

Comment 31 Rich Megginson 2015-03-24 13:22:12 UTC
(In reply to Ido Ovadia from comment #30)
> (In reply to Rich Megginson from comment #25)
> 
> > That's not the latest policy, and is not the same as what Lon has.  Can you
> > provide the audit2allow messages so we can determine if the selinux issue
> > you are seeing has been fixed in a later policy?
> ====================================================
> New file was enclosed (audit2allow.txt)

Can you try this with RHEL 7.1?

Comment 32 Ido Ovadia 2015-03-24 13:37:12 UTC
(In reply to Rich Megginson from comment #31)

> Can you try this with RHEL 7.1?

Have tried, didn't reproduced

Comment 33 Lon Hohberger 2015-03-24 13:58:15 UTC
*** Bug 1204460 has been marked as a duplicate of this bug. ***

Comment 34 Nathan Kinder 2015-03-24 14:00:20 UTC
This requires the selinux-policy package from RHEL 7.1, as it contained numerous fixes for running keystone in httpd.  Closing this as WONTFIX, since it works with the latest selinux-policy (which is what we recommend customers to run).


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