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 secondary key for fetching az key #1503

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

ntascii
Copy link
Contributor

@ntascii ntascii commented Mar 8, 2024

Summary

There are cases where the fact with primary key is not available such as puppet did not finish, fetch az fact from another key

Test plan

https://deploy.pinadmin.com/env/deploy-init/test/deploy/
Deploy a new version and restart helloworld deployment

 Host information is loaded. Host name: helloworlddummyservice-server-u20-0a0311fd, IP: 10.3.17.253, host id: i-06e65262a286e5a58, agent_version=1.2.46-pinterest-1.0.2, autoscaling_group: helloworlddummyservice-server-u20, **availability_zone: us-east-1a**, ec2_tags: {"Autoscaling": "helloworlddummyservice-server-u20", "Name": "helloworlddummyservice-server-u20-0a0311fd", "aws:autoscaling:groupName": "helloworlddummyservice-server-u20", "aws:ec2launchtemplate:id": "lt-09d19658f55f87567", "aws:ec2launchtemplate:version": "13", "pinterest.com/identity": "nimbus.teletraan.teletraan.aws-us-east-1.helloworlddummyservice-server.u20", "pinterest.com/nimbus-uuid": "9d24629e-3673-41b1-872f-f2c3887a28a1", "service_mapping": "helloworlddummyservice-server", "usage_tag": "SRE", "availability_zone": "us-east-1a"}, stage_type: None, group: ['CMP', 'helloworlddummyservice-server-u20', 'metrics-agent-prod-sidecar', 'singer-prod-sidecar', 'mcrouter-prod-sidecar', 'envoy-sidecar', 'tcollector-prod-sidecar', 'zk_update_monitor-prod-sidecar'], account id: 998131032990

Remove the primary key and restart deployment, fetch info from the secondary fact key
I0308 22:20:05.907.7978134155273 MainThread /root/.pex/installed_wheels/b947a9193e85a595eee5e84664cd4e641a0fc43acd6f538159a94e60f623e869/deploy_agent-1.2.60-py3-none-any.whl/deployd/client/client.py:199] Host information is loaded. Host name: helloworlddummyservice-server-u20-0a0311fd, IP: 10.3.17.253, host id: i-06e65262a286e5a58, agent_version=1.2.46-pinterest-1.0.2, autoscaling_group: helloworlddummyservice-server-u20, availability_zone: us-east-1a, ec2_tags: {"Autoscaling": "helloworlddummyservice-server-u20", "Name": "helloworlddummyservice-server-u20-0a0311fd", "aws:autoscaling:groupName": "helloworlddummyservice-server-u20", "aws:ec2launchtemplate:id": "lt-09d19658f55f87567", "aws:ec2launchtemplate:version": "13", "pinterest.com/identity": "nimbus.teletraan.teletraan.aws-us-east-1.helloworlddummyservice-server.u20", "pinterest.com/nimbus-uuid": "9d24629e-3673-41b1-872f-f2c3887a28a1", "service_mapping": "helloworlddummyservice-server", "usage_tag": "SRE", "availability_zone": "us-east-1a"}, stage_type: None, group: ['CMP', 'helloworlddummyservice-server-u20', 'metrics-agent-prod-sidecar', 'singer-prod-sidecar', 'mcrouter-prod-sidecar', 'envoy-sidecar', 'tcollector-prod-sidecar', 'zk_update_monitor-prod-sidecar'], account id: 998131032990

@ntascii ntascii marked this pull request as ready for review March 8, 2024 22:21
@ntascii ntascii requested a review from a team as a code owner March 8, 2024 22:21
@github-actions github-actions bot added the deploy-agent Includes changes to deploy-agent label Mar 8, 2024
Copy link
Contributor

@rwxzhu rwxzhu left a comment

Choose a reason for hiding this comment

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

LGTM

@ntascii ntascii merged commit 33f47a6 into master Mar 8, 2024
7 checks passed
@ntascii ntascii deleted the anhn/fetch_az_from_different_key branch March 8, 2024 22:45
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.

3 participants