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

Add operating system details to instance state #1234

Merged
merged 6 commits into from
Sep 24, 2024

Conversation

gibmat
Copy link
Contributor

@gibmat gibmat commented Sep 20, 2024

This adds operating system details to an instance's state. incus-agent has been extended to populate this information when running within a VM.

$ incus info debian
Name: debian
Status: RUNNING
Type: virtual-machine
Architecture: x86_64
PID: 658181
Created: 2024/09/13 16:13 MDT
Last Used: 2024/09/20 11:59 MDT
Started: 2024/09/20 11:59 MDT

Operating System:
  OS: Debian GNU/Linux
  OS Version: 12 (bookworm)
  Kernel Version: 6.1.0-25-amd64
  Hostname: debian
  FQDN: debian.testing.local

Resources:
  Processes: 16
[snip]

@github-actions github-actions bot added Documentation Documentation needs updating API Changes to the REST API labels Sep 20, 2024
@stgraber
Copy link
Member

Looks like this will need a rebase to fix the i18n conflicts.

The first commit should be split up a bit into:

  • api: instances_state_os_info
  • shared/api: Add OSInfo to InstanceState
  • doc/rest-api: Refresh swagger YAML

I also think it may be cleaner to make OSInfo a pointer rather than an attached struct.
With it being a pointer, the CLI can then just do a OSInfo != nil and then print all the fields (showing them empty if we don't have them). This will save the per-field checks and will provide more consistent output when the agent is running.

@gibmat gibmat force-pushed the add-os-info-to-instance-state branch 2 times, most recently from 6223d2a to a988fbf Compare September 23, 2024 15:51
@stgraber
Copy link
Member

Looks good, just one little bit of code to move between commits and we'll be good to go!

@gibmat gibmat force-pushed the add-os-info-to-instance-state branch from a988fbf to 977fd74 Compare September 24, 2024 14:11
@stgraber stgraber merged commit e066350 into lxc:main Sep 24, 2024
26 of 30 checks passed
@gibmat gibmat deleted the add-os-info-to-instance-state branch September 24, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Changes to the REST API Documentation Documentation needs updating
Development

Successfully merging this pull request may close these issues.

2 participants