Sunday 15 September 2013

ubuntu - Kyestone client commands fails when called inside bash script -


I am creating a small batch script which tries to install the caston and make the initial admin user, tenant etc. This is with various Keystone Sub commands and they are unable to say:

Unable to establish connection to httx: //10.0.2.100: 35357 / v2.0 / tenants

I tried sourcing NV variables through a file, using the export and - os-token and in the last resort - The command is running with os-endpoint . Here's the latest version I used to use inside the script:

Keystone - DEBUG - -to-token secret - os-endpoint httx: //10.0.2.100: 35357 / v2.0 Tenant List

The full message with debug is as follows:

WARNING: Bypass authentication using a token & amp; End point (authentication credentials are being ignored).
Debuts: Kestonclant Session: REQ: Curl-I-X GET Turksx: //10.0.2.100: 35357 / V 2.0 / Tenants -H "User-Agent: Python-KensteinKline" -H "X-Auth-Token: Secret "
Information: urllib3.connectionpool: Starting a new HTTP connection (1): 10.0.2.100 Unable to establish connection with httx: //10.0.2.100: 35357 / v2 0 / tenants

But if I run the same order directly on the shell shell, then I have no problem. For debugging output, I Has been given:

Keystone - Debug - -O-token secret - OS-Endpoint httx: //10.0.2.100: 35357 / v2.0 Tenant list Warning: using tokens Bypass authentication & amp; End point (authentication credentials are being ignored).
Debuts: Kestonclant Session: REQ: Curl-I-X GET TourxX: //10.0.2.100: 35357 / V 2.0 / Tenants -H "User-agent: Python-key installation" -H "X-Auth-Token: Secret "info: urllib3.connectionpool: Starting a new HTTP connection (1): 10.0.2.100 Debuts: urllib3.connectionpool: Set the timeout to 600.0 to read: urllib3.connectionpool:" GET / V2.0 / Tenants http / 1.1 "200 256 Debuts: Kestonclont Session: RSP: [200] {'Date': 'Mars, 17 March 2015 14:28:20 GMT', ' Rasp Body: 'X-Auth-Token', 'Content-Length': '256', 'Content-Type': 'Application / Jason', 'X-Distribution': 'Ubuntu' {"Description": "Administrator", "Enabled": True, "ID": "17008f66b9b54ca39654846e0b5e7af2", "Name": "Administrator"}, {"Description": {"Tenants", " : "Service tenant", "enabled": true, "id": "3a6823c10e454f4294aebdfec8b0c5dd", "name": "service"}]} + --------------- ------------- ------ + --------- + --------- + | ID | Name | Enabled | + ---------------------------------- + --------- +---- ----- + | 17008f66b9b54ca39654846e0b5e7af2 | Administrator | True | | 3a6823c10e454f4294aebdfec8b0c5dd | Service | True | + ---------------------------------- + --------- +---- ----- +

It seems that only when the script fails to run the command ... I do not know why ... any help Appreciated.

PS I had to change the http with adequate http to be able to post because I do not have enough reputation points.

"post-text" itemprop = "text">

After a few hours ... I finally figured out what is wrong. In my script, I first restarted the Keystone service so that the change in "/etc/keystone/keystone.conf" file will be kept in mind and I run the castestone orders properly. It seems that it takes some time for Keeston to answer my orders before I added "sleep 1" between the two commands and now it works. Maybe it would be useful to anyone: -)


No comments:

Post a Comment