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

CDP-8328: deploy-agent: emit normandie and knox status inside PingRequest #1759

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

Tweedeldee
Copy link
Contributor

@Tweedeldee Tweedeldee commented Dec 4, 2024

Description

Add normandie status and knox status to ping requests
CDP-8328

Development status

  • Normandie status is defined by the presence of a valid normandie's certificate.
  • Knox status is defined by knox deamon running successfully
  • Both fields are emitted in ping requests and stored in hosts_and_agents SQL table

Associated PRs

Previous version of this PR

#1745

@Tweedeldee Tweedeldee requested a review from a team as a code owner December 4, 2024 20:12
@github-actions github-actions bot added the deploy-agent Includes changes to deploy-agent label Dec 4, 2024
@Tweedeldee
Copy link
Contributor Author

Tweedeldee commented Dec 4, 2024

Test in devapp

deploy-agent alone

Command

sudo PINLOG_MIN_LOG_LEVEL=DEBUG PINLOG_LOG_TO_STDERR=1 PINLOG_STDERR_LEVEL=DEBUG PINLOG_LOG_DIR=/var/log/deployd IS_PINTEREST=true METRIC_PORT_HEALTH=18126 METRIC_CACHE_PATH=/mnt/deployd/metrics.cache PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ~/code/teletraan/deploy-agent/bazel-bin/deployd/deploy-agent -e prod -f /etc/deployagent.conf --use-facter

With valid Normandie certificate and knox daemon running

D23:28:16 [deployd.client.client] PingRequest(
hostId=i-0fa4dfea2b1b5f531, 
hostName=devrestricted-jpierre,
[...]
normandieStatus=OK, 
knoxStatus=OK, 
reports=PingReport([...])

With valid Normandie certificate and knox daemon stopped

sudo service knox stop
D23:31:57 [deployd.client.client] PingRequest(hostId=i-0fa4dfea2b1b5f531, hostName=devrestricted-jpierre, hostIp=10.9.196.125, 
[...]
normandieStatus=OK, 
knoxStatus=ERROR, 
reports=PingReport([...])

@liyaqin1
Copy link
Contributor

liyaqin1 commented Dec 4, 2024

It's important to update (or bump) the version number as it will be used for deploying the deploy-init sidecar.

@Tweedeldee Tweedeldee force-pushed the jpierre/CDP-8328-split-deploy-agent branch from 1f4fe5a to df5f85e Compare December 4, 2024 23:29
@Tweedeldee Tweedeldee merged commit 746ba7a into master Dec 13, 2024
8 checks passed
@Tweedeldee Tweedeldee deleted the jpierre/CDP-8328-split-deploy-agent branch December 13, 2024 18:45
Tweedeldee added a commit that referenced this pull request Dec 17, 2024
Tweedeldee added a commit that referenced this pull request Dec 17, 2024
… PingRequest (#1759) (#1768)

* Revert "CDP-8328: deploy-agent: emit normandie and knox status inside PingRequest (#1759)"

This reverts commit 746ba7a.

* Bump deployd version to 1.2.67 to enable puppet deployment

* remove extra whitespaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy-agent Includes changes to deploy-agent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants