Naming convention for cloud shell container will lead to validation errors

Bug #1847227 reported by Robert Duncan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zun UI
Fix Released
High
hongbin

Bug Description

The naming convention for the cloud shell container is:

 “cloud-shell-<user>-<project>-<domain>-<region>

<user> will frequently contain an email@address and the regex for docker container name validation is:

const RestrictedNameChars = `[a-zA-Z0-9][a-zA-Z0-9_.-]`

it would be better to rely on user id perhaps, also we could come up against a hard limit in the container name at some point. Is the container name important?
cloud-shell-<user-id>-<project-id> ?

Revision history for this message
hongbin (hongbin034) wrote :

The name itself is not important. I guess it is serving as a unique identifier for the cloud shell container. I will look into the details of that.

Changed in zun-ui:
status: New → Confirmed
assignee: nobody → hongbin (hongbin034)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zun-ui (master)

Fix proposed to branch: master
Review: https://review.opendev.org/688311

Changed in zun-ui:
status: Confirmed → In Progress
hongbin (hongbin034)
Changed in zun-ui:
importance: Undecided → High
Revision history for this message
Robert Duncan (rduncan-t) wrote :

I have applied this fix but the issue still persists, is there something in horizon I need to do to pick up the new javascript? - I have run manage.py collectstatic and flushed memcache, but zun-ui is still trying to create the container with the name parameter

Revision history for this message
hongbin (hongbin034) wrote :

@Robert,

This is the command I used in my environment:

cd /opt/stack/horizon/ && rm -rf static/ && python manage.py collectstatic --noinput && python manage.py compress --force && sudo service apache2 restart

Revision history for this message
Robert Duncan (rduncan-t) wrote :

yeah that's it, works now - thanks a lot.
for anyone else the path in kolla-ansible horizon is /var/lib/kolla/venv/bin/manage.py

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to zun-ui (master)

Reviewed: https://review.opendev.org/688311
Committed: https://git.openstack.org/cgit/openstack/zun-ui/commit/?id=2583d574d278b6bb32f7a3de1c6c1e3bdd0e8869
Submitter: Zuul
Branch: master

commit 2583d574d278b6bb32f7a3de1c6c1e3bdd0e8869
Author: Hongbin Lu <email address hidden>
Date: Sun Oct 13 18:49:10 2019 +0000

    Use labels to identify the cloud-shell container

    Change-Id: Ic3dd0f949c3937f0e5b5d4f81aed7ca30ab271ff
    Closes-Bug: #1847227

Changed in zun-ui:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zun-ui (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/689639

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to zun-ui (stable/train)

Reviewed: https://review.opendev.org/689639
Committed: https://git.openstack.org/cgit/openstack/zun-ui/commit/?id=370a5847229605b1f03ac61caaf27e9c9b7fb5d2
Submitter: Zuul
Branch: stable/train

commit 370a5847229605b1f03ac61caaf27e9c9b7fb5d2
Author: Hongbin Lu <email address hidden>
Date: Sun Oct 13 18:49:10 2019 +0000

    Use labels to identify the cloud-shell container

    Change-Id: Ic3dd0f949c3937f0e5b5d4f81aed7ca30ab271ff
    Closes-Bug: #1847227
    (cherry picked from commit 2583d574d278b6bb32f7a3de1c6c1e3bdd0e8869)

tags: added: in-stable-train
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.