Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When root container is not Tenant, cv_container fails #113

Closed
titom73 opened this issue Jan 9, 2020 · 4 comments
Closed

When root container is not Tenant, cv_container fails #113

titom73 opened this issue Jan 9, 2020 · 4 comments
Assignees
Labels
module: cv_container Issue related to cv_container module status: in-progress Currently under investigation or implementation type: bug Something isn't working
Milestone

Comments

@titom73
Copy link
Contributor

titom73 commented Jan 9, 2020

Issue Type

  • Bug Report

Module Name

cv_container

Description

Module assumes root container is always named Tenant as it is the default value. But some design have this value changed.

When root container is not Tenant then, module starts an infinite loop as it is looking for a non-existing key.

Instead of assuming root is Tenant, module should identify the root container and use it as base for the tree representation

@titom73 titom73 added type: bug Something isn't working status: in-progress Currently under investigation or implementation module: cv_container Issue related to cv_container module labels Jan 9, 2020
@titom73 titom73 added this to the v1.1 milestone Jan 9, 2020
@titom73 titom73 self-assigned this Jan 9, 2020
titom73 added a commit that referenced this issue Jan 9, 2020
Implement a fucntion to get container's name acting as root container.
If not found, returns Tenant as it is default CVP value.
@titom73
Copy link
Contributor Author

titom73 commented Jan 9, 2020

Need to remove references to Tenant in default container as well:

modules/cv_container.py:    default_containers = ['Tenant', 'Undefined', 'root']

titom73 added a commit that referenced this issue Jan 10, 2020
Identify root container from CV facts and use it dynamically instead of
relying on Tenant which can be changed

- Implement a function to identify root container
- Build list of builtin containers at startup
- Remove tenant references
- Implement baseline for debug outputs
@titom73
Copy link
Contributor Author

titom73 commented Jan 10, 2020

Dynamic root container identification tested in lab sucessfuly:

2020-01-10 10:19:16,240   -> CloudVision container {'Key': 'root', 'Name': 'Tenant', 
'CreatedBy': 'cvp system', 'CreatedOn': 1569850167062, 'Mode': 'expand', 'name': 'Tenant',
'key': 'root', 'parentName': None, 'parentId': None, 'type': None, 'id': 21,
'factoryId': 1, 'userId': None, 'childContainerId': None, 'devices': [], 'configlets': [],
'imageBundle': ''}
2020-01-10 10:19:16,240   -> CloudVision ROOT container has name Tenant

Must be tested in a setup with custom root container

@Hugh-Adams
Copy link
Contributor

Hugh-Adams commented Jan 10, 2020 via email

@titom73
Copy link
Contributor Author

titom73 commented Jan 10, 2020

Tested with following scenario:

  • Standard setup with Tenant as root (small playbook)
  • Custom setup with User defined name for root
  • Standard with AVD (large playbook)

@titom73 titom73 closed this as completed Jan 10, 2020
@titom73 titom73 modified the milestones: v1.1, v1.0.3 Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: cv_container Issue related to cv_container module status: in-progress Currently under investigation or implementation type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants