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

define $DNS_JSON in the same way as $PROVISIONER_JSON #2255

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aspiers
Copy link
Member

@aspiers aspiers commented Jul 27, 2016

23794e5 started referring to DNS_JSON without ever defining it, so apparently this ability to override DNS settings during install via /{etc,root}/crowbar/dns.json has been broken for 3 years and 3 days ...

Another example of why #shellsucks - undefined variables are silently used without any error or even warning.

23794e5 started referring to DNS_JSON without ever defining it, so
apparently this ability to override DNS settings during install via
/{etc,root}/crowbar/dns.json has been broken for 3 years and 3 days ...
@nicolasbock
Copy link
Contributor

+1

@dirkmueller
Copy link
Contributor

@aspiers you can make shell bail out on undefined variables by setting "-u".

@dirkmueller dirkmueller self-assigned this Oct 18, 2016
Copy link
Member

@vuntz vuntz left a comment

Choose a reason for hiding this comment

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

@vuntz
Copy link
Member

vuntz commented Jan 6, 2017

@aspiers I'll close, feel free to reopen if you disagree

@vuntz vuntz closed this Jan 6, 2017
@aspiers aspiers reopened this Jan 8, 2017
@aspiers
Copy link
Member Author

aspiers commented Jan 8, 2017

The bug is there, but not for the reason I describe in this PR. If you look at the commit this PR refers to, you'll see that I wrote the code you linked to, so it's somewhat embarrassing / amusing that I had forgotten about that and misunderstood the source of the bug. The problem is that DNS_JSON gets defined too late, just a few lines after it is used.

So we still need to fix this, but it will be cleaner to submit a new PR. That said, I've reopened this one as a reminder that we need to submit a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

5 participants