vatesfr / xen-orchestra

The global orchestration solution to manage and backup XCP-ng and XenServer.
https://xen-orchestra.com
Other
780 stars 264 forks source link

FR: Notes field for VM #5792

Closed savage1279 closed 8 months ago

savage1279 commented 3 years ago

It would be useful to have a field in which I can write notes about VM. Note is a multiline text field with some descriptive information such as OS details, installed software, etc

olivierlambert commented 3 years ago

OS details are already reported by tools. But a kind of free text field that should be easy to add (more or less checking for potential injection). We need to put a limit on it because then it will be stored in the XAPI object, like in "other config" field.

Any objection @psafont ? What should be the char limit in there to not cause issues with XAPI?

psafont commented 3 years ago

I guess it's possible as long as the length is bound, say 2048 characters.

I would think, however, that automating the gathering this information is the way to go if it's really needed: Collecting os details and installed packages is better done by an agent in the VM reporting the information to XO.

As a sysadmin I would prefer to use a system to automate deployment of software to know at all times what software is installed, without having to depend on xenserver for this.

olivierlambert commented 3 years ago

I think having "Notes" makes sense to put some random details in there (eg "I need to do this on this VM" and so on, or "update this Postgres next week). But yeah, should be short I suppose.

savage1279 commented 3 years ago

I mean not only the list of installed software, but also its purpose. i.e

1. mysql is used for: redmine, artifactory and other software
2. postres: for custom java apps
3. samba domain controller for accounting department
4. etc

and it would be great if it will be a richtext

olivierlambert commented 3 years ago

we could always support markdown in XO UI

julien-f commented 1 year ago

Maybe we could use the description field for this?

I.e. allow the description to be on multiple lines and format it as Markdown?

olivierlambert commented 1 year ago

The issue is this: description is meant to provide a kind of "quick" view on what this VM is. Not some details about it, like "notes" can be.

Maybe it's better to get a dedicated field with a key we can insert into other-config?

julien-f commented 1 year ago

The first line of description could be used as excerpt where necessary.

2048 chars is quite limited for a Mardown note, maybe the description does not share this limitation.

olivierlambert commented 1 year ago

I'm not fond of mixing notes and description. Cf in various tools, like Netbox, it's 2 different things, it's even called "Comments", which is even more precise.

julien-f commented 1 year ago

Still, 2048 is quite short, not sure it will be enough for a Markdown document.

olivierlambert commented 1 year ago

We could probably start simple with only 2048, and see later if it's really a blocker :)

julien-f commented 8 months ago

After investigating, it seems name_description does not suffer from this limitation, should we use it instead?

And do like commit messages: the first line is the short description, the rest is the markdown long one.