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

parameterize the restrict options #69

Merged
merged 2 commits into from
Feb 20, 2015

Conversation

Phil-Friderici
Copy link
Contributor

1st step for better Solaris compatibility. Please have a look if it's going into the right direction.
Asked local Solaris specialist if the defaults valid for Solaris 9 to 11. Will confirm after I got the reply.

@Phil-Friderici
Copy link
Contributor Author

for issue #60

@ghoneycutt
Copy link
Owner

Looks great!

@Phil-Friderici
Copy link
Contributor Author

Thanks :) I'll need to get the given Solaris defaults confirmed.
Additionally I'll make key/drift/tinker options optionally with the next commit.

@ghoneycutt
Copy link
Owner

Since they are all there to fix issues with Solaris, feel free to submit them as one PR if you would like.

@ghoneycutt
Copy link
Owner

Should update readme that restrict_options can also be an array and add the restrict_localhost param.

}
}
else {
fail("restrict_options must be an array (prefered) or a string (will be deprecated).")
Copy link
Owner

Choose a reason for hiding this comment

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

Why will string be deprecated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a suggestion only
Well, the new handling in the template is using an arrays. In my eyes it is preferable to have input and output variables in the same format. It avoids possible conversation errors and surprises on the user side. If you use a string it result in two lines with -4 and -6 as prefix. Using an array it will output exaxtly your input.

Above string to array conversation is a dirty workaround in my eyes. It's (hopefully) only there to not break things and expectations until the next major version update.

Copy link
Owner

Choose a reason for hiding this comment

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

Totally agree. If we bump the major version, we can introduce other breaking changes. Is there anything else we should change? I was thinking of merging this and your solaris code and making that the last of v3 and then we could move to v4, but I do not want to do that unless there are really compelling reasons to break compatibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On a major change, both restrict options could be merged into one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we could rename $disable_monitor to $enable_monitor to have positive wording :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

technicaly restrict_options and restrict_localhost could get merged into one (would break backward compatibility now)

@Phil-Friderici
Copy link
Contributor Author

Small change on Solaris 11 default values was needed, but now we having solid defaults there :)
The second commit is paramterizing the usage of driftfile & tinker at all.

@@ -702,4 +761,63 @@
end
end
end

describe 'with enable_driftfile set to' do
Copy link
Owner

Choose a reason for hiding this comment

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

shouldn't this be part of the platforms hash?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I agree, that would be better. I could also reuse $driftfile, if it's empty I disable the complete block. This way we don't need an additional variable. I'll give it a try, let's see if it looks good.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed the way it works. If $driftfile is empty the complete section will not be used anymore.
Because it's not mandatory but desireable to turn of driftfile for Solaris I have not touched the default values anymore. But spec tests are prepared for such a default in future times.

@Phil-Friderici Phil-Friderici force-pushed the solaris_fix branch 4 times, most recently from 42d1dcd to ef86e9b Compare February 19, 2015 19:17
@Phil-Friderici
Copy link
Contributor Author

Think now it's complete. I'll ask the guy who needed that to test it tomorrow. Let's see if he's happy with that.

@Phil-Friderici Phil-Friderici force-pushed the solaris_fix branch 2 times, most recently from b7d7f72 to d1463f0 Compare February 20, 2015 08:48
@Phil-Friderici
Copy link
Contributor Author

All thumbs up from the Solaris guy :)

ghoneycutt added a commit that referenced this pull request Feb 20, 2015
parameterize the restrict options
@ghoneycutt ghoneycutt merged commit f2f1ee3 into ghoneycutt:master Feb 20, 2015
@ghoneycutt
Copy link
Owner

Release in v3.5.2

Thanks!

@ghoneycutt ghoneycutt mentioned this pull request Feb 20, 2015
@Phil-Friderici
Copy link
Contributor Author

Nice and smooth one :) Thanks @ghoneycutt

@Phil-Friderici Phil-Friderici deleted the solaris_fix branch September 30, 2015 07:32
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.

None yet

2 participants