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

Overhaul handling of auto-updates in the installer code. #12076

Merged
merged 9 commits into from
Feb 18, 2022

Conversation

Ferroin
Copy link
Member

@Ferroin Ferroin commented Feb 2, 2022

Summary

This completely overhauls how we are handling setup of auto-updates in the installer code. After this PR:

  • The netdata-updater.sh script is properly bundled as part of our binary packages.
  • The netdata-updater.sh script can be used to toggle auto-updates on and off with new --enable-auto-updates and --disable-auto-updates options.
  • The kickstart code will leverage the newly added options for the updater script to toggle auto-updates on or off, instead of punting to netdata-installer.sh or the static build installer code to do this.
  • Manually running the netdata-installer.sh script will not result in auto-updates being enabled (they did not always work correctly for this case as it was), though it will still install the netdata-updater.sh script which can be used to manually enable auto-updates. The --auto-update option and associated other options will be silently ignored.
  • Manually running a self-extracting static build archive will not result in auto-updates being enabled (this did usually work, but current evidence indicates that essentially none of our users actually do this anyway), though it will still install the netdata-updater.sh script which can be used to manually enable auto-updates. The --auto-update option will be silently ignored.

Existing installs will be unaffected by these changes, other than native package-based installs properly including the updater script.

Test Plan

Basic handling of the new --enable-auto-updates and --disable-auto-updates options can be done trivially on any existing static or locally built install by downloading the copy of the script from this PR and simply running it with the appropriate option.

Testing of the kickstart changes will require an approach similar to our CI for testing the kickstart script against the code from the PR itself by using an override of the download URL for the source tarball.

Additional Information

Fixes: #12072

@github-actions github-actions bot added area/docs area/packaging Packaging and operating systems support labels Feb 2, 2022
@Ferroin Ferroin marked this pull request as ready for review February 3, 2022 17:05
@Ferroin
Copy link
Member Author

Ferroin commented Feb 4, 2022

Rebased to resolve merge conflict.

Copy link
Contributor

@kickoke kickoke left a comment

Choose a reason for hiding this comment

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

Docs look fine. Thank you for updating the docs. :)

@Ferroin
Copy link
Member Author

Ferroin commented Feb 8, 2022

Rebased to resolve merge conflicts.

kickoke
kickoke previously approved these changes Feb 9, 2022
Copy link
Contributor

@kickoke kickoke left a comment

Choose a reason for hiding this comment

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

Docs: I really appreciate the well-written documentation. Thank you!

@Ferroin
Copy link
Member Author

Ferroin commented Feb 10, 2022

Rebased to resolve merge conflicts.

@Ferroin
Copy link
Member Author

Ferroin commented Feb 16, 2022

Rebased to resolve merge conflicts.

maneamarius
maneamarius previously approved these changes Feb 17, 2022
@maneamarius
Copy link
Contributor

Your shellcheck failed

image

@Ferroin
Copy link
Member Author

Ferroin commented Feb 17, 2022

Your shellcheck failed

Indeed, though it’s failing on unrelated code instead of on something I was actually changing, so I think it’s safe to ignore.

@Ferroin
Copy link
Member Author

Ferroin commented Feb 17, 2022

Rebased to resolve merge conflicts.

netdata -W buildinfo | grep 'Install type:'
```

If this produces no output, you have an older install and will have to manually look in the Netdata config directory.
If you are not sure where your Netdata config directory is, see the [configuration doc](/docs/configure/nodes.md). In
most installations, this is `/etc/netdata`.

Use `cd` to navigate to the Netdata config directory, then use `ls -a` to look for a file called `.install-type`.
Copy link
Contributor

Choose a reason for hiding this comment

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

@Ferroin Line 34 contains instructions but they are stuffed away in a paragraph.
Would you be fine to restructure the steps into an ordered list?
I proposed the following in the blog:

image

kickoke
kickoke previously approved these changes Feb 18, 2022
maneamarius
maneamarius previously approved these changes Feb 18, 2022
@Ferroin
Copy link
Member Author

Ferroin commented Feb 18, 2022

Rebased to fix merge conflicts.

Also fixed doubled / in paths pointed out by @kickoke.

@Ferroin
Copy link
Member Author

Ferroin commented Feb 18, 2022

Merging this as the CI is passing and the only functional change since the last round of approvals is a documentation fix.

@Ferroin Ferroin merged commit da7f215 into netdata:master Feb 18, 2022
@Ferroin Ferroin deleted the updater-install-handling branch February 18, 2022 15:08
Ferroin added a commit to Ferroin/netdata that referenced this pull request Feb 19, 2022
Ferroin added a commit that referenced this pull request Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs area/packaging Packaging and operating systems support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Netdata native binary packages are missing the netdata-updater script
4 participants