puppetlabs-toy-chest / puppetlabs-openstack

Puppet Labs Reference and Testing Deployment Module for OpenStack (master tracks Kilo)
Apache License 2.0
90 stars 107 forks source link

error on glance setup #195

Open srikanth787 opened 9 years ago

srikanth787 commented 9 years ago

Info: /Stage[main]/Glance::Api/Glance_cache_config[DEFAULT/auth_url]: Scheduling refresh of Service[glance-api] Notice: /Stage[main]/Glance::Registry/Exec[glance-manage db_sync]: Triggered 'refresh' from 53 events Info: /Stage[main]/Glance::Registry/Exec[glance-manage db_sync]: Scheduling refresh of Service[glance-api] Info: /Stage[main]/Glance::Registry/Exec[glance-manage db_sync]: Scheduling refresh of Service[glance-registry] Notice: /Stage[main]/Glance::Registry/Service[glance-registry]: Triggered 'refresh' from 18 events Notice: /Stage[main]/Glance::Api/Service[glance-api]: Triggered 'refresh' from 47 events Error: Could not prefetch glance_image provider 'glance': Execution of '/usr/bin/glance --os-tenant-name services --os-username glance --os-password na-mu-va --os-region-name openstack --os-auth-url http://172.16.33.4:35357/v2.0/ image-list' returned 1: Request returned failure status 401. Invalid OpenStack Identity credentials.

Error: Execution of '/usr/bin/glance --os-tenant-name services --os-username glance --os-password na-mu-va --os-region-name openstack --os-auth-url http://172.16.33.4:35357/v2.0/ image-create --name=Cirros --is-public=Yes --container-format=bare --disk-format=qcow2 --copy-from=http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img' returned 1: Request returned failure status 401. Invalid OpenStack Identity credentials.

Error: /Stage[main]/Openstack::Setup::Cirros/Glance_image[Cirros]/ensure: change from absent to present failed: Execution of '/usr/bin/glance --os-tenant-name services --os-username glance --os-password na-mu-va --os-region-name openstack --os-auth-url http://172.16.33.4:35357/v2.0/ image-create --name=Cirros --is-public=Yes --container-format=bare --disk-format=qcow2 --copy-from=http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img' returned 1: Request returned failure status 401. Invalid OpenStack Identity credentials.

Notice: /Stage[main]/Openstack::Profile::Firewall::Pre/Firewall[0001 - related established]/ensure: created Notice: /Stage[main]/Openstack::Profile::Firewall::Pre/Firewall[0002 - localhost]/ensure: created Notice: /Stage[main]/Openstack::Profile::Firewall::Pre/Firewall[0003 - localhost]/ensure: created Notice: /Stage[main]/Openstack::Profile::Firewall::Pre/Firewall[0022 - ssh]/ensure: created Notice: /Stage[main]/Openstack::Profile::Firewall::Post/Firewall[8999 - Accept all management network traffic]/ensure: created Notice: /Stage[main]/Openstack::Profile::Firewall::Post/Firewall[9100 - Accept all vm network traffic]/ensure: created Notice: /Stage[main]/Openstack::Profile::Firewall::Post/Firewall[9999 - Reject remaining traffic]/ensure: created Info: Creating state file /var/lib/puppet/state/state.yaml Notice: Finished catalog run in 397.60 seconds

storage node setup is ending with this error.

root@storage:~# puppet agent -t --server=pupmaster Info: Retrieving plugin Info: Loading facts in /var/lib/puppet/lib/facter/ip6tables_version.rb Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb Info: Loading facts in /var/lib/puppet/lib/facter/apt_update_last_success.rb Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb Info: Loading facts in /var/lib/puppet/lib/facter/apt_updates.rb Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb Info: Loading facts in /var/lib/puppet/lib/facter/iptables_version.rb Info: Loading facts in /var/lib/puppet/lib/facter/rabbitmq_erlang_cookie.rb Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb Info: Loading facts in /var/lib/puppet/lib/facter/iptables_persistent_version.rb Info: Caching catalog for storage Info: Applying configuration version '1432484231' Error: Could not prefetch glance_image provider 'glance': Execution of '/usr/bin/glance --os-tenant-name services --os-username glance --os-password na-mu-va --os-region-name openstack --os-auth-url http://172.16.33.4:35357/v2.0/ image-list' returned 1: Request returned failure status 401. Invalid OpenStack Identity credentials.

Error: Execution of '/usr/bin/glance --os-tenant-name services --os-username glance --os-password na-mu-va --os-region-name openstack --os-auth-url http://172.16.33.4:35357/v2.0/ image-create --name=Cirros --is-public=Yes --container-format=bare --disk-format=qcow2 --copy-from=http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img' returned 1: Request returned failure status 401. Invalid OpenStack Identity credentials.

Error: /Stage[main]/Openstack::Setup::Cirros/Glance_image[Cirros]/ensure: change from absent to present failed: Execution of '/usr/bin/glance --os-tenant-name services --os-username glance --os-password na-mu-va --os-region-name openstack --os-auth-url http://172.16.33.4:35357/v2.0/ image-create --name=Cirros --is-public=Yes --container-format=bare --disk-format=qcow2 --copy-from=http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img' returned 1: Request returned failure status 401. Invalid OpenStack Identity credentials.

Notice: Finished catalog run in 10.35 seconds root@storage:~#

root@controller:~# source openrc root@controller:~# glance image-list Request returned failure status 401. Invalid OpenStack Identity credentials. root@controller:~#

cmurphy commented 9 years ago

Seems like there is an issue with the glance user, does keystone user-list work? Also inspect the puppet output from the first run for any issues in creating the user.

srikanth787 commented 9 years ago

root@controller:~# keystone user-list +----------------------------------+------------+---------+---------------------------+ | id | name | enabled | email | +----------------------------------+------------+---------+---------------------------+ | 5fd5010495c84bb7845bd592e5eb58e0 | admin | True | chris.hoge@puppetlabs.com | | 3be74055492c4b96b844ecabfabade6e | ceilometer | True | ceilometer@localhost | | 426ca8e40a324d61b4d14c2fb6ec41c8 | cinder | True | cinder@localhost | | b6b95a3d8fb8407e94abb48dd1f10121 | demo | True | demo@example.com | | 7b67de3c6a1d442d81230bb349c3080b | demo2 | True | demo@example.com | | 3d0564fd093f414593a774ad77a99a37 | glance | True | glance@localhost | | 27efd6410a7b4d2c82a8bcdf7d29fa57 | heat | True | heat@localhost | | fe5143245f9e44bea57369f4f347f5f9 | heat-cfn | True | heat-cfn@localhost | | 20b342c705764325a7ae9159a75f8300 | neutron | True | neutron@localhost | | e7135ffaba9b42aa9b7a923f1d94a881 | nova | True | nova@localhost | | 095f77d2b71e40efb04eb9b3f9bf3cda | swift | True | swift@localhost | | fadb52f52b2043058743d7cb2a9f63ac | test | True | test@example.com | +----------------------------------+------------+---------+---------------------------+ root@controller:~#

I do see that glance user is created

Islam-Nasreddine commented 9 years ago

Salam alikom,

I have a solution to all glance problems:

the constructor of puppetlabs-openstack module was forgotten to install glance registry service in the storage, this error make your identity_uri variable unchangeable. because glance api and registry is installed in storage node you can see here the architecture with list of services. you need to change somme files in this module to correct this problem, so luts go

step 01:

add registry installation to this file /etc/puppet/modules/openstack/manifests/role/storage.pp : class openstack::role::storage inherits ::openstack::role { class { '::openstack::profile::firewall': } class { '::openstack::profile::glance::api': } class { '::openstack::profile::glance::registry': } #this line is forgoten class { '::openstack::profile::cinder::volume': } class { '::openstack::setup::cirros': } }

step 02:

install glance and python-glanceclient packages rather than glance-api and glance-registry because these two last packages is not for openstack juno release, you can se here the correct name of glance packages in install guide, and if you use it somme packages dependencies will not be installed and you this error in the dashboard: unable to retrieve image list . so to do this go to /etc/puppet/modules/glance/manifests/params.pp and change these two lines: $api_package_name = 'glance-api' $registry_package_name = 'glance-registry' to $api_package_name = 'glance' $registry_package_name = 'python-glanceclient'

finally i think everything is will be insha Allah correct, if you have any other problem, I’m here to help you. thinks.

cmurphy commented 9 years ago

add registry installation to this file /etc/puppet/modules/openstack/manifests/role/storage.pp : ... class { '::openstack::profile::glance::registry': } #this line is forgoten

The registry profile is a noop: https://github.com/puppetlabs/puppetlabs-openstack/blob/master/manifests/profile/glance/registry.pp#L3 The glance::registry class is included in the API profile: https://github.com/puppetlabs/puppetlabs-openstack/blob/master/manifests/profile/glance/api.pp#L34

install glance and python-glanceclient packages rather than glance-api and glance-registry

The master branch targets the kilo release, not the juno release, and the package names in the glance module should be up to date for kilo. If you find they are incorrect you can file a bug against the puppet-glance module.

cmurphy commented 9 years ago

Hi @srikanth787,

Can you try installing the openstack-selinux package? I'm now able to reproduce this bug with certain versions of selinux, and installing the openstack-selinux package fixed it. If this solves your issue too we can potentially find a place for it in the module.

iamshulya commented 9 years ago

HI @cmurphy , a have the same problem @srikanth787 on Ubuntu 14.04, how i can resolve this problem?

root@os-tst-storage01:~# /usr/bin/glance -dv --os-tenant-name services --os-username glance --os-password na-mu-va --os-region-name openstack --os-auth-url http://172.16.33.4:35357/v2.0 image-list curl -i -X GET -H 'User-Agent: python-glanceclient' -H 'Content-Type: application/octet-stream' -H 'Accept-Encoding: gzip, deflate, compress' -H 'Accept: /' -H 'X-Auth-Token: ***' http://192.168.92.162:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20 Request returned failure status 401. Invalid OpenStack Identity credentials.

From controller the same error/