Repository navigation
Warn about the Filestore driver and hand bootstrap a cluster's own network - #53
Conversation
|
@aditya-shantanu could you review this one ahead of #41? It fixes a data-loss bug: when the installer connects to an existing cluster, provision's It's small and independent of #41. The two do overlap in a few places, all keep-both-sides, so once this lands I'll rebase #41 onto it. |
fb90ac9 to
a1e4eab
Compare
aditya-shantanu
left a comment
There was a problem hiding this comment.
Follow-up pass on a1e4eab. All 11 prior threads are addressed in code (list-mode enter refused on load error + describe guard; refusal ahead of probe and skipped in bgProbes; mirror test tied to tools/setup-gcp; conditional upgrade-track advice; provision header copy; stored reason; SelectCluster/NewCluster; shared-vpc-prod + substrate-poc fixtures; remedy text; state.RegionOf; README wording) and are resolved. go test ./... passes at the head; merges cleanly onto main.
One non-blocking note inline. Sequencing: #55 rewrites createClusterIdempotent to warn instead of recreate, which makes TestBootstrapRecreatesMirrorsSetupGCP fail and the Shared VPC refusal over-strict; whichever of #53/#55 lands second needs to drop or re-derive the guard, as the test message says.
aditya-shantanu
left a comment
There was a problem hiding this comment.
Re-review at aa2a7ec.
Prior thread (retry after a partial new-cluster bootstrap): fixed in aa2a7ec, resolved.
#55 interaction. #55 is on main. createClusterIdempotent now logs a warning and keeps the cluster on any network/subnetwork/Dataplane V2 drift; deleteCluster is gone from the reconcile path, and the installer runs this repo's tools/setup-gcp (Builder.SetupGCP). So the recreate this PR guards against no longer happens on the merged tree. Still valid: handing an existing cluster its own network (now just silences three spurious warnings) and both Filestore warnings (bootstrap still disables the managed CSI driver). No longer valid: the BootstrapRecreates refusal and the mirror test (inline), and the recreate wording at README.md:95, snapshot.go:525/740-741, the guard's refusal message, and screens_gcp.go:879-880.
Mergeability. CONFLICTING against main. Conflicts: installer/internal/snapshot/snapshot.go (env(): main renamed GVISOR_NODE_MACHINE_TYPE to NODE_MACHINE_TYPE; Bootstrap(): main's Display is now the resolved path - keep both main-side changes), docs/screenshots/{clusters,guard,provision}.svg (regenerate).
Tests. Head: go vet and go test ./... pass in installer/ and tools/setup-gcp/. Scratch merge with the two snapshot.go hunks hand-resolved: everything passes except TestBootstrapRecreatesMirrorsSetupGCP (see inline). No interaction with #47 found; ui passes on the merged tree.
The earlier approval should not be relied on until this is rebased onto main and the refusal plus mirror test are dropped or re-derived against post-#55 setup-gcp.
aa2a7ec to
0501268
Compare
|
Reworked on top of main: dropped the recreate refusal, the mirror test and the new-cluster existence check, since #55 means bootstrap keeps the cluster now. What's left is the Filestore warnings, handing an existing cluster its own network, and the small cleanups. Squashed to one commit and updated the description. Could you take another look? |
aditya-shantanu
left a comment
There was a problem hiding this comment.
Re-review at 0501268 (rebased onto fb7727a, single commit).
Prior threads (aa2a7ec): all three addressed by removal — BootstrapRecreates/recreate mode, TestBootstrapRecreatesMirrorsSetupGCP, and the IFS=$'\t' read existence check are gone. Resolved.
Coherent with post-#55 setup-gcp. Checked against main's tools/setup-gcp/cmd/cluster.go: createClusterIdempotent only slog.Warns on network/subnetwork/Dataplane V2 drift (HasSuffix on projects/$PROJECT_ID/global/networks/$NETWORK and projects/$PROJECT_ID/regions/$GCE_REGION/subnetworks/$SUBNETWORK, currentIsV2 == ADVANCED_DATAPATH) and still disables the Filestore addon when enabled; ENABLE_DATAPLANE_V2 reaches bootstrap because cluster.go's init writes getEnv into the shared cfg. Handing NetworkName()/SubnetworkName()/DataplaneV2 plus GCE_REGION=st.Region() lines up with that comparison. No remaining copy says delete/recreate; README, provision.svg and the Filestore step match what bootstrap does.
Non-blocking: a Shared VPC cluster (projects/<host>/global/networks/N) still gets both warnings since setup-gcp prefixes cfg.ProjectID; the state.go comment "finds no difference to warn about" overstates that case. setup-gcp's limitation, not this PR's.
go vet/go test ./... pass in installer/ and tools/setup-gcp/ at this head; main is an ancestor; also merges clean with #59's head.
…twork Bootstrap turns off GKE's managed Filestore CSI driver on an existing cluster, before you've decided whether to install Substrate's replacement. Now provision says so when it happens, and the Filestore step says skipping leaves the cluster with no Filestore driver. For an existing cluster, bootstrap now gets the cluster's own network, subnetwork and Dataplane V2 setting instead of the defaults, which match few real clusters and just made bootstrap warn about each difference. The advanced track's network fields only apply to new clusters. Also: the cluster selection fields are set in one place (Setup.SelectCluster / NewCluster), and the name prompt can't be opened while the cluster list failed to load.
0501268 to
2752936
Compare
|
Rebased onto main now that #41 is in. SelectCluster / NewCluster now also set #41's fields (EnableBetaAPIs, BetaAPIsOptional, ReplacePools), so those live in one place too. Fixed the state.go comment you flagged for Shared VPC. I also moved the dry-run Filestore fixture to substrate-ga, since on substrate-poc provision now ends on #41's pool check and the warning wasn't on the last screen. |
aditya-shantanu
left a comment
There was a problem hiding this comment.
Re-review at 2752936 (single commit, rebased onto 611c7ce).
Range-diff vs 0501268: every differing hunk is the rebase onto #41. SelectCluster/NewCluster now also own EnableBetaAPIs, BetaAPIsOptional and ReplacePools, with the same values main's choose() and the name path set; no other writer of those fields remains outside the upgrade track. The dry-run Filestore fixture moved to substrate-ga and the test presses 4 (row keys are 1-based, so that is substrate-ga; it reaches Provision with no pool-check panel, so the warning stays on screen). The BootstrapNetwork comment now says Shared VPC still warns, as flagged last time. No overlap with #59's hunks (project-screen submit). The two SVG changes are gone correctly: uishots output is byte-identical on main and this head, since the provision shot uses substrate-poc, which no longer carries the addon.
Checks: go vet ./... and go test ./... pass in installer/ (ui 566s) and tools/setup-gcp/ at this head; git merge-tree origin/main is clean. The UNSTABLE merge state is the org Actions security scan awaiting approval, not a code check (this repo has no Go test workflow).
FYI: #56 adds RELEASE_CHANNEL beside the NETWORK/SUBNETWORK lines in snapshot.go env() and a neighbouring test, so whichever of the two lands second needs a one-line rebase there. No semantic overlap with the selection setters.
Pulls in the change that stops setup-gcp disabling the Filestore add-on on an existing cluster from [Agent Substrate PR 2485](agent-substrate/substrate#2485). setup-gcp matches upstream. The installer warned about the old behavior (ai-on-gke#53), so it changes too: - Provision no longer warns that bootstrap turns off GKE's managed Filestore CSI driver. - The optional Filestore step still turns the managed driver off before installing Substrate's (DeployFilestoreCSI is unchanged). On an existing cluster with the driver on, it now warns that installing does this and that skipping keeps the managed driver. - The tools/setup-gcp README also drops Filestore from the settings it updates in place on an existing cluster.
Bootstrap turns off GKE's managed Filestore CSI driver on an existing cluster, before you've decided whether to install Substrate's replacement in the Filestore step. Now provision says so when it happens, and the Filestore step says that skipping leaves the cluster with no Filestore driver.
For an existing cluster, bootstrap now gets the cluster's own network, subnetwork and Dataplane V2 setting instead of the defaults. Most real clusters don't match the defaults (GKE usually makes a
gke-<name>-subnet-…subnet), so bootstrap was warning about all three. The advanced track's network fields only apply to new clusters now.Smaller stuff: the cluster selection fields get set in one place (
Setup.SelectCluster/NewCluster), and the name prompt can't be opened while the cluster list failed to load.This used to also refuse clusters that bootstrap would delete and recreate, but #55 stopped bootstrap from doing that, so I dropped that part.