-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix DNS resolution performance regression during cloud-init local #6665
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
Closed
Closed
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
aa4be53
Fix DNS resolution performance regression during cloud-init local
drzee99 44c23e7
Merge branch 'canonical:main' into fix-dns-resolution-performance
drzee99 5ec0eae
Fixed linting issues
470ef62
Merge branch 'canonical:main' into fix-dns-resolution-performance
drzee99 f860f87
Revert "Fixed linting issues"
drzee99 7d9192c
Fixed linting issue with correct user id for commit
drzee99 ef26ce0
Merge branch 'canonical:main' into fix-dns-resolution-performance
drzee99 2b42b2b
Fixed linting issues
780d869
Removed wrong commit
drzee99 79dff5c
docs: fix broken external documentation links (#6664)
ayushigithub12 11eae30
ci: add reviewdog workflow lint for github actions (#6662)
blackboxsw 2c442e9
test: pytestified test_cc_growpart.py (#6625)
MoeSalah1999 6d89a5a
feat(lxd): add s390x virtio-ports detection for LXD (#6597)
blackboxsw 98caebf
ci: export python path to GITHUB_ENV from tox venv
blackboxsw bd2c08a
ci: add actionlint.yml ignores
blackboxsw 77bd696
ci: run and source pylint tox target used by TICS checkers
blackboxsw 5f0e08e
ci: retain system packages for TICS workflow due to virtualenv versio…
blackboxsw 619db91
doc: document socket protocol change
holmanb e2c5788
fix(cloudstack): Improve domain-name DHCP lease lookup (Cloudstack) (…
CodeBleu af5308d
fix: cloud-init clean --logs should not remove non-files (#6568)
blackboxsw 4a9fc8a
fix: respect SSH key options for the root user (#6585)
sbraz 55ff943
chore(stages): enable type checking (#6672)
holmanb a65c6b8
fix: migrate from ntp client package installed from ntp to ntpsec (#6…
blackboxsw b601c43
doc: clarify verbose language (#6688)
holmanb 5a129a8
Fixed linting issue with correct user id for commit
drzee99 82e5373
feat(dhcp): enable --debug option for dhcpcd (#6693)
cjp256 76fa874
doc: clarify CLA check (#6692)
holmanb 2d1f427
ci: add shared workflow for lxd_container integration tests
blackboxsw 745e05a
docs: security company policy updates (#6677)
blackboxsw 816dbeb
fix: datasource initialization order in stages (#6700)
holmanb c1024f2
Merge remote-tracking branch 'refs/remotes/origin/fix-dns-resolution-…
drzee99 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The ec2 datasource is used by various other clouds besides just ec2 - and unfortunately not all clouds are known, so this change poses a risk.
Uh oh!
There was an error while loading. Please reload this page.
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.
That is confusing. There should be a separate Data Source implementation for each provider. Even if some are same/similar to allow for future changes a cloud provider may implement.
That being said.
It is possible to override the metadata_urls ref: https://cloudinit.readthedocs.io/en/latest/reference/datasources/ec2.html
IMHO the default should be the ones that are provided by the named Data Source (in this case EC2). If this breaks other cloud providers that use the same path, then they should create an config setting for the metadata_url as pr. documentation to add the relevant metadata_urls.
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.
To be sure that I understand: You are saying that breaking clouds is justified because the code is confusing and there is a workaround that involves manual modifications to the image, right?
Uh oh!
There was an error while loading. Please reload this page.
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.
The DataSource is named DataSourceEC2.py - EC2 is explicitly referring to Amazon Web Services EC2 service (in fact "Amazon EC2" is a registered trademark). Thus it should IMHO adhere to what ever is standard for Amazon EC2 at the current point in time.
It is fair that other clouds have implemented similar things, but they should either have their own data sources OR there should be a generic data source (DataSourceGeneric,py). They should not rely on that Amazon EC2 keeps doing things the same way. What if EC2 changes fundamentally "tomorrow"?
This change in
DataSourceEC2.pyis not important and I'm happy to back it out.The important change to resolve the issue is that the check for IP addresses is made earlier in
is_resolveable()so we do not unnecessarily go into the "Detect DNS Redirection check" when we don't even have a proper network and just try to query the metadata service (the result from this query is used to setup the network).