Zun

zun attach returns Not Authorized

Bug #1671749 reported by feng.shengqin@zte.com.cn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zun
Fix Committed
High
hongbin

Bug Description

$zun run --image-pull-policy never --command "/bin/bash" -i -t --name test testimage:lastest
$zun attach test

but I get "ERROR: Not Authorized".

Are there any configures for the functoin "zun attach" ?

description: updated
Revision history for this message
Kevin Zhao (kevin-zhao) wrote :

Hi Feng,
   What's your image name?
   Could you use a normal image, such as ubuntu to reproduce the error?

Revision history for this message
feng.shengqin@zte.com.cn (feng-shengqin) wrote :

Hi Kevin,

Revision history for this message
feng.shengqin@zte.com.cn (feng-shengqin) wrote :

Hi Kevin,
    The image is builded by myself.
    "zun attach" needs special images?
    I will pull a image from dockerhub and try it first.

Revision history for this message
Kevin Zhao (kevin-zhao) wrote :

@Hi Feng,
    zun attach doesn't need a special images. Just attach with websocket client. You can try an image from dockerhub first.
    If confirmed, I will try to figure out the problem.

Revision history for this message
feng.shengqin@zte.com.cn (feng-shengqin) wrote :
Download full text (10.2 KiB)

@Kevin,
I use a ubuntu image to create a container. But I still get this problem.

[root@tfg-104 ~(keystone_admin)]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu latest 0ef2e08ed3fa 2 weeks ago 130 MB
kubernetes/pause latest 8d1389d3a249 17 months ago 350.2 kB

[root@tfg-104 ~(keystone_admin)]# zun --os-project-name admin list
+--------------------------------------+-------+--------------------------+---------+------------+------------+-----------+
| uuid | name | image | status | task_state | addresses | ports |
+--------------------------------------+-------+--------------------------+---------+------------+------------+-----------
| 1d56794b-624f-4691-aae5-f33b08f55b32 | test3 | ubuntu:latest | Running | None | 172.17.0.2 | [] |
+--------------------------------------+-------+--------------------------+---------+------------+------------+-----------

[root@tfg-104 ~(keystone_admin)]# zun --os-project-name admin attach test3
ERROR: Not Authorized

[root@tfg-104 ~(keystone_admin)]# zun --os-project-name admin --debug attach test3
DEBUG (extension:180) found extension EntryPoint.parse('v2token = keystoneauth1.loading._plugins.identity.v2:Token')
DEBUG (extension:180) found extension EntryPoint.parse('v3oauth1 = keystoneauth1.extras.oauth1._loading:V3OAuth1')
DEBUG (extension:180) found extension EntryPoint.parse('admin_token = keystoneauth1.loading._plugins.admin_token:AdminToken')
DEBUG (extension:180) found extension EntryPoint.parse('v3oidcauthcode = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAuthorizationCode')
DEBUG (extension:180) found extension EntryPoint.parse('v2password = keystoneauth1.loading._plugins.identity.v2:Password')
DEBUG (extension:180) found extension EntryPoint.parse('v3samlpassword = keystoneauth1.extras._saml2._loading:Saml2Password')
DEBUG (extension:180) found extension EntryPoint.parse('v3password = keystoneauth1.loading._plugins.identity.v3:Password')
DEBUG (extension:180) found extension EntryPoint.parse('v3oidcaccesstoken = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAccessToken')
DEBUG (extension:180) found extension EntryPoint.parse('v3oidcpassword = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectPassword')
DEBUG (extension:180) found extension EntryPoint.parse('v3kerberos = keystoneauth1.extras.kerberos._loading:Kerberos')
DEBUG (extension:180) found extension EntryPoint.parse('token = keystoneauth1.loading._plugins.identity.generic:Token')
DEBUG (extension:180) found extension EntryPoint.parse('v3oidcclientcredentials = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectClientCredentials')
DEBUG (extension:180) found extension EntryPoint.parse('v3tokenlessauth = keystoneauth1.loading._plugins.identity.v3:TokenlessAuth')
DEBUG (extension:180) found extension EntryPoint.parse('v3token = keystoneauth1.loading._plugins.identity.v3:Token')
DEBUG (extension:180) found extension EntryPoint.parse('v3totp = keystoneauth1.loading._plugins.identity.v...

Revision history for this message
Kevin Zhao (kevin-zhao) wrote :

@Feng,
   Sorry I just see your comment.
   I will check now

Revision history for this message
hongbin (hongbin034) wrote :

I can somehow reproduced this bug. It looks the option "--os-project-name" works for other commands (i.e. list, show), but doesn't work for attach since the attach command doesn't read this option. I will take care of this bug.

Changed in zun:
assignee: nobody → hongbin (hongbin034)
importance: Undecided → High
status: New → Triaged
Revision history for this message
hongbin (hongbin034) wrote :
Changed in zun:
status: Triaged → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-zunclient 0.2.0

This issue was fixed in the openstack/python-zunclient 0.2.0 release.

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.