Repository navigation
Conversation
blackboxsw
left a comment
There was a problem hiding this comment.
Thank you for the submission @vpashaiev. A couple of comments, generally we hope to avoid adding more supported configuration options in datasource config if we don't have a use-case in hand where this config option is necessary. If we expect this to be a frequently used config option, then we can stand by the added support here. Otherwise, I'd back that element out.
| self.sys_cfg, | ||
| "datasource/Ec2/wait_for_nic_timeout", |
There was a problem hiding this comment.
Do we have use-cases where we want this to be a configurable option that is longer than the default? If not, I would like to avoid adding more supported configuration options to datasource config and just set this timeout to 60.
If we do need this configuration option, this value should be sourced from self.ds_cfg and we also need to update doc/rtd/reference/datasources/ec2.rst "Configuration settings" to document this option.
| tmpdir=tmpdir, | ||
| ) | ||
| m_is_freebsd.return_value = False | ||
| m_read_dmi.return_value = "m8g.medium" |
There was a problem hiding this comment.
we should probably use pytest.mark.parametrize for read_dmi.return_value providing a couple of expected success cases and one non-matching case.
c1904de to
d4270a8
Compare
|
Thanks for the review @blackboxsw! Updated:
|
|
@vpashaiev @blackboxsw Thanks for looking at this! One concern with restricting the allowlist to 7th/8th-gen Gravitons: as noted by Robin Wallin in Launchpad #2151279, this is already failing in production on Graviton 2 and 3 instances as well. t4g (Graviton 2) in particular is one of the most widely used instance types in AWS, and I experienced this issue just the other day on a t4g.medium. Could we instead make the allowlist either cover all Graviton families (e.g. matching g or checking architecture aarch64 on EC2), or better yet, matches any EC2 instance where an ENA PCI device is present but unprobed? Otherwise t4g, c6g, and m6g will still suffer from this race (and probably other exotic types). Worst case I think adding the t4g and the *6g would be a middle ground. |
PR canonical#7065 added wait_for_candidate_nics() for hpc7a.96xlarge, but fast-booting Graviton instances (m8g, r8g, c8g, c7g, m7g, r7g, c6g, m6g, r6g, t4g) still hit the race condition where cloud-init-local runs before ena finishes PCI probe. When that happens, DataSourceEc2 exits without writing network config. Poll for candidate NICs on Graviton instances by matching product prefixes (m8g., r8g., c8g., c7g., m7g., r7g., c6g., m6g., r6g., t4g.) in DMI system-product-name. Fixes canonicalGH-6697 LP: #2151279
d4270a8 to
5973a3a
Compare
|
Added t4g, c6g, m6g, and r6g to the product prefix list. |
Proposed Commit Message
Test Steps
Merge type