| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2017-03-20 | |||
| 20:18:12 | mriedem | curl -s -H "X-Auth-Token: $OS_TOKEN" http://controller:8778/ | |
| 20:20:22 | wally | what can i get the $OS_TOKEN? | |
| 20:20:32 | wally | how can i get the $OS_TOKEN | |
| 20:21:33 | claudiub | efried: hm, that's rather surprising. the mock.patch stuff with autospec is kinda' broken, which is probably why it doesn't have the assert_called_with / assert_not_called methods. it creates NonCallableMagicMock objects, which are not callable, so it would make sense it doesn't have those assert methods. | |
| 20:21:42 | wally | [placement] auth_uri = http://controller:5000 auth_url = http://controller:35357 memcached_servers = controller:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = placement password = conalab os_region_name = RegionOne | |
| 20:21:59 | wally | this is my [placement] in nova.conf | |
| 20:22:05 | wally | is this correct | |
| 20:22:26 | claudiub | efried: i've addressed the mock.patch issue here: https://github.com/testing-cabal/mock/pull/397 . it might also solve the issue you linked. | |
| 20:22:57 | efried | claudiub Looking.. | |
| 20:24:14 | mriedem | wally: project_domain_name = default user_domain_name = default | |
| 20:24:19 | mriedem | i think default is supposed to be Default | |
| 20:24:22 | mriedem | https://review.openstack.org/#/c/438328/13/doc/install-guide/source/nova-compute-install.rst | |
| 20:24:37 | mriedem | auth_url = http://controller:35357/v3 | |
| 20:24:49 | wally | ok let me try | |
| 20:24:49 | mriedem | you don't have the v3 suffix | |
| 20:25:00 | mriedem | you will have to restart the nova-compute process after making those changes | |
| 20:25:07 | wally | yeah | |
| 20:25:13 | efried | claudiub That one might entail a serious behavior change | |
| 20:25:50 | claudiub | true, but only if autospec=True, which never really worked anyways. | |
| 20:26:03 | claudiub | or from what i've noticed at least. | |
| 20:27:37 | wally | in the controller node, nova.conf. do i need to do the same thing | |
| 20:27:43 | mriedem | yes | |
| 20:34:20 | openstackgerrit | Eric Fried proposed openstack/nova master: PowerVM Driver: spawn/delete #1: no-ops https://review.openstack.org/438119 | |
| 20:34:51 | openstackgerrit | Eric Fried proposed openstack/nova master: PowerVM Driver: spawn/destroy #2: functional https://review.openstack.org/438598 | |
| 20:35:29 | efried | adreznec esberglu ^^ ready for in-house re-+1 | |
| 20:36:11 | openstackgerrit | Matt Riedemann proposed openstack/python-novaclient master: Remove deprecated tenant network APIs https://review.openstack.org/447678 | |
| 20:37:02 | openstackgerrit | Matt Riedemann proposed openstack/python-novaclient master: Remove deprecated tenant network APIs https://review.openstack.org/447678 | |
| 20:51:09 | wally | hi mriedem, i still got the error "message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}} | |
| 20:51:28 | wally | after i change the nova.conf. | |
| 20:51:44 | wally | i used ubunt 1604 desktop, should I use Ubuntu 1604 server? | |
| 20:51:53 | wally | is there any different? | |
| 20:51:58 | mriedem | what roles does your placement user have? | |
| 20:52:21 | cdent | wally: are you sending an x-auth-token header? | |
| 20:52:21 | wally | openstack role add --project service --user placement admin | |
| 20:52:48 | wally | not sure, how to check sending an x-auth-token header? | |
| 20:53:30 | cdent | is that 401 error happening when you do curl? or is it showing up somewhere else? | |
| 20:53:43 | wally | when i do the curl on the compute node | |
| 20:54:03 | wally | only for this endpoint, all the other endpoint are good | |
| 20:54:13 | openstackgerrit | Diana Clarke proposed openstack/nova master: Fix rest_api_version_history (2.40) https://review.openstack.org/447688 | |
| 20:54:41 | mriedem | wally: what does your curl request look like? | |
| 20:54:50 | mriedem | if you aren't specifying the x-auth-token header, then you're not sending a token | |
| 20:54:54 | cdent | does that curl statement include the phrase "x-auth-token", a bit like `curl -H "x-auth-token: |
|
| 20:54:58 | wally | root@compute1:~# curl http://controller:8778 {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}root@compute1:~# root@compute1:~# | |
| 20:54:59 | mriedem | OS_TOKEN=$(openstack token issue -f value -c id) | |
| 20:55:04 | cdent | yeah, what mriedem just said | |
| 20:55:06 | mriedem | curl -s -H "X-Auth-Token: $OS_TOKEN" http://controller:8778/ | |
| 20:55:07 | openstackgerrit | Eric Fried proposed openstack/nova master: PowerVM Driver: power_on/off and reboot https://review.openstack.org/427380 | |
| 20:55:15 | efried | adreznec esberglu ^ | |
| 20:55:16 | mriedem | wally: you aren't sending a token | |
| 20:55:42 | esberglu | efried: ack | |
| 20:55:44 | mriedem | wally: create an rc file using the same credentials that you have in the [placement] section of nova.conf, source that rc file, then run "OS_TOKEN=$(openstack token issue -f value -c id)" | |
| 20:55:46 | mriedem | to get the token | |
| 20:55:52 | mriedem | and then: curl -s -H "X-Auth-Token: $OS_TOKEN" http://controller:8778/ | |
| 20:56:12 | wally | ok let me try again | |
| 20:56:43 | wally | root@controller:/var/log/apache2# curl -s -H "X-Auth-Token: $OS_TOKEN" http://controller:8778/ {"versions": [{"min_version": "1.0", "max_version": "1.4", "id": "v1.0"}]} | |
| 20:56:47 | wally | yeah, now is that correct? | |
| 20:56:53 | wally | is the correct respone | |
| 20:57:13 | mriedem | yes | |
| 20:57:18 | mriedem | f yes | |
| 20:57:38 | wally | so mean my placement api is working? | |
| 20:57:50 | mriedem | yes | |
| 20:58:01 | cdent | nice teamwork wally and mriedem | |
| 20:58:40 | wally | but then why i ran this command root@controller:/var/log/apache2# nova-status upgrade check | |
| 20:59:03 | wally | still show this http://paste.openstack.org/show/603499/ | |
| 20:59:06 | wally | could you please check | |
| 20:59:44 | wally | must have somehing not config right | |
| 20:59:44 | mriedem | that's reading from nova.conf and using keystoneauth | |
| 20:59:53 | wally | OH | |
| 21:00:00 | wally | so how to fix this keystoneauth | |
| 21:00:03 | wally | in nova.conf | |
| 21:00:26 | wally | [keystone_authtoken] auth_uri = http://controller:5000 auth_url = http://controller:35357 memcached_servers = controller:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = nova password = conalab | |
| 21:00:37 | wally | anything wrong? | |
| 21:00:38 | mriedem | well, it's just the credentials from the [placement] section in nova.conf | |
| 21:00:57 | wally | [placement] auth_uri = http://controller:5000 auth_url = http://controller:35357/v3 memcached_servers = controller:11211 auth_type = password project_domain_name = Default user_domain_name = Default project_name = service username = placement password = conalab os_region_name = RegionOne | |
| 21:01:08 | wally | so there much be something wrong with my [placement] | |
| 21:01:24 | wally | do i need to add : $OS_TOKEN" | |
| 21:01:49 | openstackgerrit | Matt Riedemann proposed openstack/python-novaclient master: Remove deprecated floating IP DNS domain/entry APIs https://review.openstack.org/447690 | |
| 21:01:54 | wally | this is my controller node nova.conf | |
| 21:02:03 | mriedem | wally: you have to pass a token with the curl command | |
| 21:02:10 | mriedem | oops nvm | |
| 21:02:13 | mriedem | was reading something old | |
| 21:02:58 | wally | in the curl, it working, but when i run nova-status upgrade check, not working | |
| 21:03:10 | mriedem | right, what's your nova.conf look like? | |
| 21:03:11 | wally | mean something woring with nova.conf right? | |
| 21:03:14 | mriedem | yes | |
| 21:03:35 | wally | in the [placement] right | |
| 21:04:09 | wally | can u please check this http://paste.openstack.org/show/603505/ | |
| 21:04:28 | wally | how can i pass the token in the nova.conf | |
| 21:04:53 | mriedem | the request goes through the keystoneauth library, | |
| 21:05:01 | mriedem | provided the credentials in nova.conf, | |
| 21:05:06 | mriedem | ksa generates the token | |
| 21:05:35 | mriedem | http://logs.openstack.org/77/447577/1/check/gate-tempest-dsvm-neutron-full-ubuntu-xenial/f6ccfe1/logs/etc/nova/nova.conf.txt.gz | |
| 21:05:35 | mriedem | compare with nova.conf from a CI run | |
| 21:06:24 | wally | u maen company my nova.conf with your nova.conf | |
| 21:06:34 | wally | compare my nova.conf with your nova.conf | |
| 21:07:16 | mriedem | wally: what's the OS_AUTH_URL value in your localrc? | |
| 21:08:14 | wally | export OS_PROJECT_DOMAIN_NAME=default export OS_USER_DOMAIN_NAME=default export OS_PROJECT_NAME=admin export OS_USERNAME=admin export OS_PASSWORD=conalab export OS_AUTH_URL=http://controller:35357/v3 export OS_IDENTITY_API_VERSION=3 export OS_IMAGE_API_VERSION=2 | |
| 21:08:14 | wally | you mean the admin.rc | |
| 21:08:27 | wally | this is my admin-openrc.sh | |
| 21:09:28 | mriedem | i think you can remove the auth_uri option, that's deprecated | |