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

Passing the base platform name to the nodemanager #3612

Merged
merged 1 commit into from
May 6, 2020

Conversation

lancewf
Copy link
Contributor

@lancewf lancewf commented May 6, 2020

Before:
before_nodes

After:
after_nodes

@@ -250,7 +250,7 @@ func (ccr *ChefClientRun) initializeNodeInfo() (sharedNodeInfo NodeInfo, err err
UptimeSeconds: int64(uptimeSeconds),
OrganizationName: ccr.OrganizationName,
Environment: ccr.NodePayload.ChefEnvironment,
Platform: getPlatformWithVersion(ccr.NodePayload),
Platform: ccr.PlatformWithVersion(),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is cleaning up the way we grab the platform.

@@ -30,6 +30,7 @@ type ChefRun struct {
NodeRun backend.Run
NodeAttribute backend.NodeAttribute
BulkableRequests []elastic.BulkableRequest
Platform string
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the raw platform to the message that is passed along in the pipeline.

@@ -80,6 +80,9 @@ func ChefRunTransmogrify(in <-chan message.ChefRun, out chan<- message.ChefRun,
continue
}

// Needed for the nodemanager because the platform field is combined with the version.
msg.Platform = ccr.Platform()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the only place we have access to the raw platform. So, we set the pipeline msg platform here.

@@ -82,7 +84,7 @@ func gatherInfoForNode(node backend.Node) (*manager.NodeMetadata, error) {
return &manager.NodeMetadata{
Uuid: node.EntityUuid,
Name: node.NodeName,
PlatformName: node.PlatformFamily,
PlatformName: msg.Platform,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then at this point, we can set the platform from the pipeline message.

Copy link

@vjeffrey vjeffrey left a comment

Choose a reason for hiding this comment

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

yes! this is great, thank you!

@vjeffrey vjeffrey merged commit 154753b into vj/platform-tags-state May 6, 2020
vjeffrey pushed a commit that referenced this pull request May 6, 2020
vjeffrey pushed a commit that referenced this pull request May 7, 2020
…sort options (#3596)

* send platform family and version from ingest -> nodemanager

Signed-off-by: Victoria Jeffrey <[email protected]>

* send all report tags (including env) to nodemanager

Signed-off-by: Victoria Jeffrey <[email protected]>

* allow sorting by state for nodes

Signed-off-by: Victoria Jeffrey <[email protected]>

* test updates

Signed-off-by: Victoria Jeffrey <[email protected]>

* test for sorting nodes

Signed-off-by: Victoria Jeffrey <[email protected]>

* fix unit test

Signed-off-by: Victoria Jeffrey <[email protected]>

* use lowercase environment

Signed-off-by: Victoria Jeffrey <[email protected]>

* argh one more test fix

Signed-off-by: Victoria Jeffrey <[email protected]>

* Passing the base platform name to the nodemanager (#3612)

Signed-off-by: Lance Finfrock <[email protected]>

* unit test fix

Signed-off-by: Victoria Jeffrey <[email protected]>

Co-authored-by: Lance Finfrock <[email protected]>
@lancewf lancewf deleted the base_platform_name branch September 11, 2020 16:34
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