cloudflared icon indicating copy to clipboard operation
cloudflared copied to clipboard

🐛 no-autoupdate is not working

Open romeroyonatan opened this issue 2 years ago • 1 comments

Describe the bug Our tunnels were impacted by a regression. However we set the no-autoupdate option to true to prevent this type of bugs

To Reproduce

  1. Configure "no-autoupdate": true
  2. Release a new version
  3. After one day (autoupdate-freq) cloudflared should not be updated

Expected behavior cloudflared should not be updated if no-autoupdate is set to true

Environment and versions

  • OS: Ubuntu 20.04
  • Architecture: amd64
  • Version: 2022.7.0

Logs and errors This is when the server was deployed

Jun 24 13:36:15 host cloudflared[3766]: 2022-06-24T13:36:15Z INF Version 2021.8.2
Jun 24 13:36:15 host cloudflared[3766]: 2022-06-24T13:36:15Z INF Settings: map[config:/etc/cloudflared/config.yml cred-file:/etc/cloudflared/****.json credentials-file:/etc/cloudflared/***.json no-autoupdate:true]
Jun 24 13:36:15 host cloudflared[3766]: 2022-06-24T13:36:15Z INF Generated Connector ID: *****
Jun 24 13:36:15 host cloudflared[3766]: 2022-06-24T13:36:15Z INF Initial protocol http2
Jun 24 13:36:15 host cloudflared[3766]: 2022-06-24T13:36:15Z INF Starting metrics server on 127.0.0.1:41785/metrics
Jun 24 13:36:15 host cloudflared[3766]: 2022-06-24T13:36:15Z WRN Your version 2021.8.2 is outdated. We recommend upgrading it to 2022.6.3

This is from today

Jul 06 00:00:05 host cloudflared[3367500]: 2022-07-06T00:00:05Z INF Version 2022.7.0
Jul 06 00:00:05 host cloudflared[3367500]: 2022-07-06T00:00:05Z INF GOOS: linux, GOVersion: go1.17.10, GoArch: amd64
Jul 06 00:00:05 host cloudflared[3367500]: 2022-07-06T00:00:05Z INF Settings: map[config:/etc/cloudflared/config.yml cred-file:/etc/cloudflared/*****.json credentials-file:/etc/cloudflared/******.json no-autoupdate:true]

All the versions that this server had

root@host:~# journalctl -g "INF Version"  -u cloudflared | head -n3
-- Logs begin at Tue 2022-06-14 19:23:08 UTC, end at Wed 2022-07-06 13:09:31 UTC. --
Jun 24 13:36:15 host cloudflared[3766]: 2022-06-24T13:36:15Z INF Version 2021.8.2
Jun 25 00:00:06 host cloudflared[290600]: 2022-06-25T00:00:06Z INF Version 2022.6.3
Jul 06 00:00:05 host cloudflared[3367500]: 2022-07-06T00:00:05Z INF Version 2022.7.0

Additional context ~I think the boolean enabled is never checked in the Run function https://github.com/cloudflare/cloudflared/blob/7607ead143646c4c01d35d0fe8d17663c31b65de/cmd/cloudflared/updater/update.go#L221~ Update: the service cloudflared-update automatically upgrades cloudflared and ignores the no-autoupdate setting https://github.com/cloudflare/cloudflared/blob/092e76eb55b996b4ee11e6574e64be6d6d9e22e4/cmd/cloudflared/linux_service.go#L74

romeroyonatan avatar Jul 06 '22 13:07 romeroyonatan

I assume the no-autoupdate option is incompatible when installing as a systemd service (which I guess makes sense). However you should be able to simply disabled the cloudflared-update.timer which is what I have done...

septatrix avatar Aug 11 '22 17:08 septatrix