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

Virtualization/LXC: use utsname instead of container name #993

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

mayasd
Copy link

@mayasd mayasd commented Feb 4, 2022

This change responds to a problem with container name created in Proxmox.

In fact an ID is use in Promox to named LXC container.

For example:

lxc-ls -f
NAME STATE   AUTOSTART GROUPS IPV4         IPV6               UNPRIVILEGED 
100  RUNNING 0         -      XX.XX.XX.XX  XXXX:XXXX:XXX:XXXX false
101  RUNNING 0         -      XX.XX.XX.XX  XXXX:XXXX:XXX:XXXX false
106  RUNNING 0         -      XX.XX.XX.XX  XXXX:XXXX:XXX:XXXX false
108  RUNNING 0         -      XX.XX.XX.XX  XXXX:XXXX:XXX:XXXX false
113  RUNNING 0         -      XX.XX.XX.XX  XXXX:XXXX:XXX:XXXX false

With ID instead of hostname we are unable to know which server it is in GLPI.

Proxmox preserve utsname in containers configuration file so if you are ok I think we can used utsname parameter if it's exist instead of container name displayed in lxc-ls command.

Copy link
Contributor

@g-bougard g-bougard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting feature, good job.
I only have one suggestion, check it and tell us what you think.
You'll probably have to fix test if you decide to follow it.

g-bougard added a commit to glpi-project/glpi-agent that referenced this pull request Feb 4, 2022
@mayasd
Copy link
Author

mayasd commented May 31, 2022

Hi,
Do you have any update about this PR ?
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants