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

feat: annotate node and instance states with architecture #40

Merged
merged 2 commits into from
May 29, 2024

Conversation

gjasny
Copy link
Contributor

@gjasny gjasny commented May 29, 2024

Pull Request

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Build related changes
  • Documentation content changes
  • Other: (describe here)

Proposed Change

For both: the instance as well as the node states it would be nice to see how the numbers affect the two different CPU architectures.

Breaking Change?

  • Yes
  • No

The querying tools should sum up the per-architecture numbers. But I'm unsure if all of them actually do.

Checklist

Please validate that your PR fulfills the following requirements:

  • I have read the CONTRIBUTING.md documentation (if available)
  • I have branched from the default repo branch (can be master, main, or release/vX.X)
  • I have checked that a similar PR does not exist or has been rejected in the past
  • PR changes are specific to a feature or bug
  • No style/format/cosmetic changes included
  • I have used existing style and naming patterns in my changes
  • Tests for the changes have been added/updated (if relevant)
  • Built/compiled and tested locally
  • Docs have been added/updated (if relevant)
  • I have squashed my changes into a single commit

Additional Information

Node States:

# HELP anka_node_states_count Count of Nodes in a particular State (label: arch, state)
# TYPE anka_node_states_count gauge
anka_node_states_count{arch="amd64",state="Active"} 2
anka_node_states_count{arch="amd64",state="Inactive (Invalid License)"} 0
anka_node_states_count{arch="amd64",state="Offline"} 0
anka_node_states_count{arch="amd64",state="Updating"} 0
anka_node_states_count{arch="arm64",state="Active"} 3
anka_node_states_count{arch="arm64",state="Inactive (Invalid License)"} 0
anka_node_states_count{arch="arm64",state="Offline"} 0
anka_node_states_count{arch="arm64",state="Updating"} 0

Instance States:

# HELP anka_instance_state_count Count of Instances in a particular State (label: arch, state)
# TYPE anka_instance_state_count gauge
anka_instance_state_count{arch="amd64",state="Error"} 0
anka_instance_state_count{arch="amd64",state="Pulling"} 1
anka_instance_state_count{arch="amd64",state="Pushing"} 0
anka_instance_state_count{arch="amd64",state="Scheduling"} 1
anka_instance_state_count{arch="amd64",state="Started"} 2
anka_instance_state_count{arch="amd64",state="Stopped"} 0
anka_instance_state_count{arch="amd64",state="Stopping"} 0
anka_instance_state_count{arch="amd64",state="Terminated"} 0
anka_instance_state_count{arch="amd64",state="Terminating"} 0
anka_instance_state_count{arch="arm64",state="Error"} 0
anka_instance_state_count{arch="arm64",state="Pulling"} 0
anka_instance_state_count{arch="arm64",state="Pushing"} 0
anka_instance_state_count{arch="arm64",state="Scheduling"} 0
anka_instance_state_count{arch="arm64",state="Started"} 3
anka_instance_state_count{arch="arm64",state="Stopped"} 0
anka_instance_state_count{arch="arm64",state="Stopping"} 0
anka_instance_state_count{arch="arm64",state="Terminated"} 0
anka_instance_state_count{arch="arm64",state="Terminating"} 0

@@ -60,6 +66,7 @@ type VmData struct {
TemplateName string
GroupUUID string `json:"group_id"`
NodeUUID string `json:"node_id"`
Arch string `json:"arch"`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is the arch field always present? According to the docs:

All fields but the following are omitted if empty: vmid, group_id, instance_state, anka_registry, ts, cr_time, progress, vlan and usb_device.

Copy link
Member

Choose a reason for hiding this comment

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

Only for controller >= 1.22.0. I'm not aware of any customers still on that version, so this should be fine. Though, I'll make a readme note in the main branch

@NorseGaud NorseGaud changed the base branch from master to release/v3.0.0 May 29, 2024 21:34
@NorseGaud
Copy link
Member

Hey @gjasny, I had started working on arch today too and it looks like you did the work for me of what I had remaining on my list! Thank you so much!

@NorseGaud NorseGaud merged commit 2a41acd into veertuinc:release/v3.0.0 May 29, 2024
1 check passed
@gjasny gjasny deleted the expose-architecture branch May 29, 2024 22:14
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