[1.11-2301] Admin tenant not created during provisioning

Bug #1358109 reported by Vedamurthy Joshi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Fix Committed
High
Ignatious Johnson Christopher
R1.1
Fix Committed
High
Ignatious Johnson Christopher

Bug Description

On 1.11-2301, admin tenant is not created

http://anamika.englab.juniper.net:8080/job/centos64_os_havana_Single_Node_Sanity/206/console

mysql> select * from project
    -> ;
+----------------------------------+--------------------+-------+-------------+---------+-----------+
| id | name | extra | description | enabled | domain_id |
+----------------------------------+--------------------+-------+-------------+---------+-----------+
| 4140879959cc454d84c5035536b80981 | invisible_to_admin | {} | NULL | 1 | default |
| 79b1db46038942ffa23ec56d494e3147 | service | {} | NULL | 1 | default |
| 8cbd560f879d4471afcf79e83dccbf3a | demo | {} | NULL | 1 | default |
+----------------------------------+--------------------+-------+-------------+---------+-----------+
3 rows in set (0.00 sec)

mysql>

2014-08-17 19:22:29:122784: [root@10.204.216.36] out: + '[' none '!=' none ']'
2014-08-17 19:22:29:122961: [root@10.204.216.36] out: + cat
2014-08-17 19:22:29:123126: [root@10.204.216.36] out: + cat
2014-08-17 19:22:29:123359: [root@10.204.216.36] out: + export ADMIN_PASSWORD
2014-08-17 19:22:29:123517: [root@10.204.216.36] out: + export SERVICE_PASSWORD
2014-08-17 19:22:29:124117: [root@10.204.216.36] out: + '[' none '!=' none ']'
2014-08-17 19:22:29:124352: [root@10.204.216.36] out: + openstack-config --set /etc//.conf sql connection mysql://keystone:keystone@127.0.0.1/keystone
2014-08-17 19:22:29:124524: [root@10.204.216.36] out: Traceback (most recent call last):
2014-08-17 19:22:29:126603: [root@10.204.216.36] out: File "/usr/bin/openstack-config", line 49, in <module>
2014-08-17 19:22:29:126785: [root@10.204.216.36] out: conf.readfp(open(cfgfile))
2014-08-17 19:22:29:126967: [root@10.204.216.36] out: IOError: [Errno 2] No such file or directory: '/etc//.conf'
2014-08-17 19:22:29:127142: [root@10.204.216.36] out: + for APP in keystone
2014-08-17 19:22:29:127300: [root@10.204.216.36] out: + '[' 1 -eq 1 ']'
2014-08-17 19:22:29:127500: [root@10.204.216.36] out: + openstack-db -y --init --service keystone --rootpw 3043772adfabde82e764
2014-08-17 19:22:29:127660: [root@10.204.216.36] out: Verified connectivity to MySQL.
2014-08-17 19:22:29:229019: [root@10.204.216.36] out: Creating 'keystone' database.
2014-08-17 19:22:29:229248: [root@10.204.216.36] out: Initializing the keystone database, please wait...
2014-08-17 19:22:29:229419: [root@10.204.216.36] out: Complete!
2014-08-17 19:22:30:432412: [root@10.204.216.36] out: + '[' none '!=' none ']'
2014-08-17 19:22:30:432641: [root@10.204.216.36] out: + source /etc/contrail/keystonerc
2014-08-17 19:22:30:432814: [root@10.204.216.36] out: ++ export OS_USERNAME=admin
2014-08-17 19:22:30:433030: [root@10.204.216.36] out: ++ OS_USERNAME=admin
2014-08-17 19:22:30:433185: [root@10.204.216.36] out: ++ export SERVICE_TOKEN=28276f4a2189c39f2d07
2014-08-17 19:22:30:433343: [root@10.204.216.36] out: ++ SERVICE_TOKEN=28276f4a2189c39f2d07
2014-08-17 19:22:30:433500: [root@10.204.216.36] out: ++ export OS_SERVICE_ENDPOINT=http://10.204.216.36:35357/v2.0
2014-08-17 19:22:30:433658: [root@10.204.216.36] out: ++ OS_SERVICE_ENDPOINT=http://10.204.216.36:35357/v2.0
2014-08-17 19:22:30:433814: [root@10.204.216.36] out: + bash contrail-keystone-setup.sh 10.204.216.36
2014-08-17 19:22:30:433992: [root@10.204.216.36] out: Unable to establish connection to http://10.204.216.36:35357/v2.0/tenants
2014-08-17 19:22:30:766986: [root@10.204.216.36] out: Unable to establish connection to http://10.204.216.36:35357/v2.0/tenants
2014-08-17 19:22:31:131904: [root@10.204.216.36] out: No tenant with a name or ID of 'admin' exists.
2014-08-17 19:22:40:150112: [root@10.204.216.36] out: usage: keystone user-role-add --user <user> --role <role> [--tenant <tenant>]
2014-08-17 19:22:40:514939: [root@10.204.216.36] out: keystone user-role-add: error: argument --tenant/--tenant-id: expected one argument

2014-08-17 19:23:00:842437: [root@10.204.216.36] out: + for svc in keystone
2014-08-17 19:23:00:842611: [root@10.204.216.36] out: + openstack-config --del /etc/keystone/keystone.conf database connection
2014-08-17 19:23:00:842779: [root@10.204.216.36] out: Traceback (most recent call last):
2014-08-17 19:23:00:842961: [root@10.204.216.36] out: File "/usr/bin/openstack-config", line 60, in <module>
2014-08-17 19:23:00:843151: [root@10.204.216.36] out: conf.remove_option(section, parameter)
2014-08-17 19:23:00:843324: [root@10.204.216.36] out: File "/usr/lib/python2.6/site-packages/iniparse/compat.py", line 180, in remove_option
2014-08-17 19:23:00:843488: [root@10.204.216.36] out: raise NoSectionError(section)
2014-08-17 19:23:00:843647: [root@10.204.216.36] out: ConfigParser.NoSectionError: No section: ‘database'

Tags: provisioning
Revision history for this message
Ignatious Johnson Christopher (ijohnson-x) wrote :

The default value of connection in sql section of keystone.conf is mysql://keystone:keystone@locahost/keystone, So this is not the reason for admin tenant not getting created, i see that the R1.10 cenos sanity is going through fine. http://anamika.englab.juniper.net:8080/job/centos64_os_havana_Single_Node_Sanity/207/consoleFull

Even in this the sql connection is not set by the keystone-server-setup.sh.

I have raises these review requests to set it properly.
https://review.opencontrail.org/#/c/1912/
https://review.opencontrail.org/#/c/1913/

Revision history for this message
Ignatious Johnson Christopher (ijohnson-x) wrote :

Keystone takes some time to come up after keystine db init, meanwhile contrail-keystone-setup.sh is trying to create admin tenant and fails as it is not able to establish connection to keystone.

2014-08-17 19:22:30:433814: [root@10.204.216.36] out: + bash contrail-keystone-setup.sh 10.204.216.36
2014-08-17 19:22:30:433992: [root@10.204.216.36] out: Unable to establish connection to http://10.204.216.36:35357/v2.0/tenants
2014-08-17 19:22:30:766986: [root@10.204.216.36] out: Unable to establish connection to http://10.204.216.36:35357/v2.0/tenants
2014-08-17 19:22:31:131904: [root@10.204.216.36] out: No tenant with a name or ID of 'admin' exists.

One more bug reported https://bugs.launchpad.net/juniperopenstack/+bug/1358149 and Review request submitted for it https://review.opencontrail.org/#/c/1914/

Revision history for this message
Ignatious Johnson Christopher (ijohnson-x) wrote :
Changed in juniperopenstack:
importance: Undecided → High
Changed in juniperopenstack:
importance: High → Undecided
assignee: Ignatious Johnson Christopher (ijohnson-x) → nobody
Changed in juniperopenstack:
importance: Undecided → High
assignee: nobody → Ignatious Johnson Christopher (ijohnson-x)
status: New → Fix Committed
information type: Proprietary → Public
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.