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

added TINKERBELL_SKIP_NETWORKING to ./generate_env.sh #92

Conversation

JamesPGriffith
Copy link

Description

The allows vagrant up provisioner to complete.

Why is this needed

Without this change, the provisioner VM fails to complete.

Fixes: #91

How Has This Been Tested?

Executing vagrant up provisioner with the variable as an empty string:

[[TRUNCATED]]
    provisioner: ++ export TINKERBELL_SKIP_NETWORKING=
    provisioner: ++ TINKERBELL_SKIP_NETWORKING=
    provisioner: + make_certs_writable
[[TRUNCATED]]
    provisioner: ++ export TINKERBELL_SKIP_NETWORKING=
    provisioner: ++ TINKERBELL_SKIP_NETWORKING=
    provisioner: + [[ -z '' ]]
    provisioner: + setup_networking ubuntu 18.04
[[TRUNCATED]]

Removed the .env file and populate the variable string in the ./generate-env.sh and rebuilt:

[[TRUNCATED]
    provisioner: ++ export TINKERBELL_SKIP_NETWORKING=true
    provisioner: ++ TINKERBELL_SKIP_NETWORKING=true
[[TRUNCATED]
    provisioner: + [[ -z true ]]
    # IT WAS SKIPPED
    provisioner: + setup_osie
[[TRUNCATED]

This failed with running in Vagrant as expected but provides the skip behavior desired.

Note: I am not able to test this on bare-metal for which the option was originally created.

How are existing users impacted? What migration steps/scripts do we need?

Existing users are likely not impacted unless the .env was removed and recreated after #88 was merged. I was pondering whether or not the .generate_env.sh file should remove and recreate the .env file on each execution.

Checklist:

I have:

  • [ No ] updated the documentation and/or roadmap (if required)
    However, the new option appears to need to be added to the 'On Bare Metal with Docker' section of the documentation.
  • [ No ] added unit or e2e tests
    I honestly don't know enough Go to contribute a test for Vagrant completion.
  • [ No ] provided instructions on how to upgrade
    There's nothing to upgrade beyond a git pull.

@JamesPGriffith JamesPGriffith force-pushed the 91-TINKERBELL_SKIP_NETWORKING-unbound-variable branch from d34ed5c to e477522 Compare July 19, 2021 01:13
Copy link

@markjacksonfishing markjacksonfishing left a comment

Choose a reason for hiding this comment

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

/lgtm
Holding for another maintainer to review.

@markjacksonfishing markjacksonfishing added the do-not-merge Signal to Mergify to block merging of the PR. label Jul 19, 2021
@markjacksonfishing
Copy link

Once review is complete, please remove do not merge label

@dadrus
Copy link

dadrus commented Aug 15, 2021

Is it really the way to go? I mean the generate_env.sh is supposed to be used for local docker setup as well. According to my understanding, the given change might break that. What about just adding the required variable to the Vagrant file like this?

provisioner.vm.provision :shell,
                        path: './scripts/tinkerbell.sh',
                        env: {
                          'TINKERBELL_CONFIGURE_NAT': configure_nat,
                          'TINKERBELL_SKIP_NETWORKING': ""
                        }

The change is then local to the vagrant setup only.

@damdo
Copy link

damdo commented Aug 26, 2021

What's you opinion on this last comment Marky? :)

@tstromberg
Copy link
Contributor

PR looks great. Can you merge this up to master and run shfmt on generate_env.sh? The linter shows a diff.

@jacobweinstock
Copy link
Member

Hey @JamesPGriffith, #90 just landed and has changed the sandbox significantly. Would you mind having a look at the changes and confirm if this change is still something you'd like to see?

@splaspood
Copy link
Contributor

In light of @jacobweinstock 's comment and its age I'm going to move that we close this PR without merge at this time.

@jacobweinstock
Copy link
Member

Please do re-open this if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge Signal to Mergify to block merging of the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

provisioner: ./setup.sh: line 502: TINKERBELL_SKIP_NETWORKING: unbound variable
7 participants