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

node-bootstrapper #4891

Merged
merged 79 commits into from
Oct 11, 2024
Merged

node-bootstrapper #4891

merged 79 commits into from
Oct 11, 2024

Conversation

r2k1
Copy link
Contributor

@r2k1 r2k1 commented Aug 31, 2024

The current implementation is a simple wrapper around CSE scripts and a custom data generator for Linux (previously known as "self-contained" efforts).

This approach moves the script generation logic from the API layer into the VHD itself, making virtual machines more consistent and allowing for significant simplification.

By having a Go application as the main entry point to provision the VHD, we unlock a lot of new possibilities.

Switching to the new generation should be as simple as replacing GetNodeBootstrapping with GetNodeBootstrappingV2.

No changes are introduced to the current VHD provisioning.

@coveralls
Copy link

coveralls commented Aug 31, 2024

Pull Request Test Coverage Report for Build 11284326238

Details

  • 243 of 395 (61.52%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-1.1%) to 70.165%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/agent/utils.go 7 8 87.5%
pkg/agent/baker.go 35 37 94.59%
pkg/agent/bakerapi.go 0 20 0.0%
node-bootstrapper/main.go 166 295 56.27%
Totals Coverage Status
Change from base Build 11283250470: -1.1%
Covered Lines: 2808
Relevant Lines: 4002

💛 - Coveralls

installer/build.sh Outdated Show resolved Hide resolved
pkg/agent/bakerapi.go Outdated Show resolved Hide resolved
@r2k1 r2k1 requested a review from phealy as a code owner October 6, 2024 22:03
pkg/agent/baker.go Show resolved Hide resolved
pkg/agent/baker.go Show resolved Hide resolved
pkg/agent/baker.go Show resolved Hide resolved
node-bootstrapper/custom_data_test.go Show resolved Hide resolved
node-bootstrapper/main.go Outdated Show resolved Hide resolved
e2e/installer_test.go Outdated Show resolved Hide resolved
e2e/installer_test.go Outdated Show resolved Hide resolved
@@ -32,6 +32,9 @@ type Configuration struct {
IgnoreScenariosWithMissingVHD bool `env:"IGNORE_SCENARIOS_WITH_MISSING_VHD"`
SkipTestsWithSKUCapacityIssue bool `env:"SKIP_TESTS_WITH_SKU_CAPACITY_ISSUE"`
KeepVMSS bool `env:"KEEP_VMSS"`
BlobStorageAccount string `env:"BLOB_STORAGE_ACCOUNT" envDefault:"https://abe2e.blob.core.windows.net"`
Copy link
Contributor

Choose a reason for hiding this comment

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

is this a new blob storage ? how was this created ? do we have IaC for it? if this is purely to host the binary for the test, I'm wondering if we could avoid that, knowing that the more azure resources we have to more SFI work we have to do.

Copy link
Contributor Author

@r2k1 r2k1 Oct 9, 2024

Choose a reason for hiding this comment

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

It's a hack to speed e2e feedback loop.

Without it we need to rebuild the VHD before running any tests. It adds about an hour to the loop. (It takes minutes with the hack)
This code put binary on a node and run a similar CSE command to what we're going to use.

I had difficulty finding a way to upload a binary to a VM. It's not available from a public network. So, I couldn't SSH into it. And we need to execute it before we join the k8s cluster (other e2e test helpers utilizes k8s api to connect to the VM)

I think I created it manually (it's been a while ago).

I don't really like it and happy to change if you have any other ideas.

e2e/config/azure.go Show resolved Hide resolved
@@ -148,7 +148,7 @@ linters-settings:
shadow:
# Whether to be strict about shadowing; can be noisy.
# Default: false
strict: true
strict: false
Copy link
Contributor

Choose a reason for hiding this comment

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

why was this changed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The linter is being really noisy for a typical go error handling.
I think shadowing errors is fine, we shouldn't come up with err2 and err3 variables.

@r2k1 r2k1 enabled auto-merge (squash) October 11, 2024 01:48
@r2k1 r2k1 merged commit e14ca77 into master Oct 11, 2024
20 of 21 checks passed
@r2k1 r2k1 deleted the r2k1/installer branch October 11, 2024 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants