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

Update archive filename for version 3.5.5+ install #130

Merged
merged 2 commits into from
Jun 13, 2019

Conversation

alexconrey
Copy link
Contributor

Apache updated the archive file name (apparently) starting with version 3.5.5 which was released last week. This effectively resolves the issue with a minor change, the zoo_dir variable is now pointed to the symlink location as opposed to the per-version directory. I found this to be the most direct way of fixing the issue whilst not refactoring a decent bit of code. I opened #129 regarding this issue and as promised, here's my proposed fix to the issue.

  • update archive/tests

  • update filename logic

  • update zoo_path

* update archive/tests

* update filename logic

* update zoo_path


# Apache updated the filename base for archive files in release 3.5.5
if versioncmp($::zookeeper::archive_version, '3.5.5') <= 0 {

Choose a reason for hiding this comment

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

shouldn't be >= here?

Copy link
Owner

Choose a reason for hiding this comment

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

@andriisabitov Yes, I agree, the logic seems to be inversed. versioncmp(a, b) will return -1 if version a is less than version b. In this case for version 3.4.1 the new filename will be used.



# Apache updated the filename base for archive files in release 3.5.5
if versioncmp($::zookeeper::archive_version, '3.5.5') <= 0 {
Copy link
Owner

Choose a reason for hiding this comment

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

@andriisabitov Yes, I agree, the logic seems to be inversed. versioncmp(a, b) will return -1 if version a is less than version b. In this case for version 3.4.1 the new filename will be used.

@alexconrey
Copy link
Contributor Author

@deric @andriisabitov good catch, my apologies. This commit somehow didn't make it into the initial PR commit from local testing. Should be good to go now 😄

@deric
Copy link
Owner

deric commented Jun 13, 2019

No problem, thanks!

@deric deric merged commit 6f8195c into deric:master Jun 13, 2019
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.

3 participants