Repository navigation
chore(smoke): add a storage leg covering the generated mount shell - #705
Merged
Merged
Conversation
The manifest flagged pkg/userdata/storage.go as changed by #680 and the smoke did not exercise it — the gap that matters most there, since that file generates the mount, fstab and profile.d shell and its unit tests can only check rendered text and that it parses. The leg creates an EFS filesystem and mount target, launches with --efs-id, then asserts the storage gate reads ok, /efs is in /proc/mounts, and sourcing /etc/profile.d/efs.sh yields the mount point. Fixture teardown is in the existing trap, ordered mount target -> filesystem -> security group. First run found a real failure that was not a regression: EFS DNS was not resolving in the account while general DNS worked and mounting by the mount-target IP succeeded with identical options. Filed as #704.
Four runs produced three different false signals, every one a bug in this script rather than in spawn: --on-complete terminate killed the instance before the checks ran, hand-escaped JSON swallowed a $, and an escaped grep pattern reached the instance literally and reported 'mpirun reached 0 of 2 nodes' on a healthy cluster. The SSM helper now builds its payload with python json.dumps instead of shell interpolation — the same change of representation the production assembler makes by base64-encoding the peers file. Gated behind SMOKE_STORAGE=1: an untrustworthy check is worse than a missing one, which is the standard already applied to the EFA probe. The product findings underneath are real and filed as #704.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds the storage leg to
make smoke, and files what it found.Why
The hardware-sensitivity manifest flagged
pkg/userdata/storage.goas changed by #680, and the smoke did not exercise it. That is the worst place to have a gap: the file generates the mount, fstab and/etc/profile.dshell, and its unit tests can only check the rendered text and that it parses withbash -n. Neither can tell you the mount appeared, or that the profile export carries the right value.What it checks
Creates an EFS filesystem and mount target, launches with
--efs-id, then asserts:/run/spawn/storage-readyreadsok(--command still runs BEFORE the storage mounts (EFS/FSx/volumes): #166 fixed --user-data but not --command #668's gate)/efsis in/proc/mounts/etc/profile.d/efs.shyields the mount point (security.ShellEscape is not shell-safe (it is strconv.Quote): audit and migrate the remaining call sites #680's quoting, end to end)Fixture teardown rides the existing trap — mount target, then filesystem, then security group, in that order — and the independent leak check still runs afterwards.
What it found on its first run
A genuine failure that was not a regression, which is worth recording because it took four diagnostics to establish:
/etc/profile.d/efs.shsourcedEFS_MOUNT=/efs, correctfailed:not mounted: /efs— correctly reported its3.amazonaws.comresolved)VPC
enableDnsSupport/enableDnsHostnameswere both true and the mount target wasavailablein the same subnet. So the filesystem was reachable throughout and only its DNS name would not resolve — in an account that resolved EFS DNS correctly earlier the same day.Filed as #704: the mount is attempted once, so a transient DNS failure at boot fails it permanently, even though spawn knows the mount-target IP and mounting by IP works. With #668's barrier in place that turns one DNS blip into a launch that boots, bills and runs nothing.
#668's gate behaving correctly here is the reason I found this at all rather than watching a workload produce garbage against a missing directory.