-
Notifications
You must be signed in to change notification settings - Fork 114
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
nodemanager nodes: fix platform and tags info, add state to possible sort options #3596
Conversation
@@ -166,6 +166,7 @@ var nodesSortFields = map[string]string{ | |||
"status": "LOWER(n.status)", | |||
"manager": "LOWER(n.manager)", | |||
"last_contact": "n.last_contact", | |||
"state": "n.source_state", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leaving as draft til i get a test written for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
|
||
return &manager.NodeMetadata{ | ||
Uuid: node.EntityUuid, | ||
Name: node.NodeName, | ||
PlatformName: node.Platform, | ||
PlatformName: node.PlatformFamily, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we want to eventually go to just sending the platform full field? for now, i switched it to using family for consistency with compliance side of things, since it's sending name/version as two sep fields, and two sep fields is what nodemanager expects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For our example CCR
"platform_family": "rhel", |
For this other example
automate/components/config-mgmt-service/data/mappings/examples/failed_converge.json
Line 6588 in 1ca3deb
"platform_family": "debian", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I have a solution 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is one solution #3612
ill get this rebased |
Signed-off-by: Victoria Jeffrey <[email protected]>
Signed-off-by: Victoria Jeffrey <[email protected]>
Signed-off-by: Victoria Jeffrey <[email protected]>
Signed-off-by: Victoria Jeffrey <[email protected]>
Signed-off-by: Victoria Jeffrey <[email protected]>
Signed-off-by: Victoria Jeffrey <[email protected]>
Signed-off-by: Victoria Jeffrey <[email protected]>
Signed-off-by: Victoria Jeffrey <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great and looks good!
Signed-off-by: Lance Finfrock <[email protected]>
154753b
to
0cd68bf
Compare
@@ -355,6 +355,10 @@ func (ccr *ChefClientRun) CloudProvider() string { | |||
return EmptyStringIfNil(cloud["provider"]) | |||
} | |||
|
|||
func (ccr *ChefClientRun) Platform() string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh i think this is from the rebase and no longer needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh nm we call it below
Signed-off-by: Victoria Jeffrey <[email protected]>
🔩 Description: What code changed, and why?
a few issues:
⛓️ Related Resources
#3515
👍 Definition of Done
platform information doesn't double up. tags are all sent over, including env. can filter by state.
👟 How to Build and Test the Change
go_update_component compliance-service
same for ingest-service
and nodemanager-service
send in some reports, e.g. load_compliance_reports
check the data returned by
api/v0/nodes
, accessible at automate-url/nodes in the ui✅ Checklist
Aha! Link: https://chef.aha.io/features/SH-1780