Page MenuHomeVyOS Platform

show system updates doesnt seem to be working
Closed, ResolvedPublicBUG

Description

Executing "show system updates" but nothing seems to be happening.

When terminating the execution (ctrl+c) I get the following dump:

:...skipping...
Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/system.py", line 87, in <module>
    res = vyos.opmode.run(sys.modules[__name__])
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/opmode.py", line 263, in run
    res = func(**args)
          ^^^^^^^^^^^^
  File "/usr/libexec/vyos/op_mode/system.py", line 78, in show_update
    data = _compare_version_raw()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/libexec/vyos/op_mode/system.py", line 37, in _compare_version_raw
    remote_data = vyos.version.get_remote_version(url)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/version.py", line 137, in get_remote_version
    return remote_data.json()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
                             ^^^^^^^^^
  File "/usr/lib/python3/dist-packages/requests/models.py", line 928, in text
    encoding = self.apparent_encoding
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/requests/models.py", line 793, in apparent_encoding
    return chardet.detect(self.content)["encoding"]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/chardet/__init__.py", line 49, in detect
    detector.feed(byte_str)
  File "/usr/lib/python3/dist-packages/chardet/universaldetector.py", line 236, in feed
    if self._utf1632_prober.feed(byte_str) == ProbingState.FOUND_IT:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/chardet/utf1632prober.py", line 199, in feed
    self.position += 1
    ^^^^^^^^^^^^^
KeyboardInterrupt

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.4-rolling-202307190317
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Related Objects

Event Timeline

It is not fully implemented.
You have to set the URL to a JSON file with System versions, which not exists for now (there is no permanent URL for it), so it will be in the future developments.

set system update-check url link_to_url_json_versions

PoC was implemented here https://vyos.dev/T3476 in PR https://github.com/vyos/vyos-1x/pull/1521

The tested JSON file

[
   {
      "arch":"amd64",
      "flavors":[
       "generic"
    ],
    "image":"vyos-rolling-latest.iso",
    "latest":true,
    "lts":false,
    "release_date":"2022-09-02",
    "release_train":"sagitta",
    "url":"http://s3-us.vyos.io/rolling/current/vyos-rolling-latest.iso",
    "version":"1.4-rolling-202209060217"
  }
]

Ooh, I thought update-check should point to the iso-file like so:

set system update-check url https://s3-us.vyos.io/rolling/current/vyos-rolling-latest.iso

I guess this case will be updated once there exists a permanent "image-versions.json" url to poll?

I can confirm by removing the incorrect update-check url like so:

delete system update-check url

then "show system updates" works as expected:

vyos@vyos:~$ show system updates 
system update-check not configured

What is the "system update-check url" supposed to be once its implemented?

vyos@r4:~$ 
vyos@r4:~$ show conf com | match upd
set system update-check auto-check
set system update-check url 'https://raw.githubusercontent.com/vyos/vyos-rolling-nightly-builds/main/version.json'
vyos@r4:~$ 
vyos@r4:~$ 
vyos@r4:~$ show system updates 
Current version: 1.5-rolling-202312220023

Update available: 1.5-rolling-202312260023
Update URL: https://github.com/vyos/vyos-rolling-nightly-builds/releases/download/1.5-rolling-202312260023/1.5-rolling-202312260023-amd64.iso
vyos@r4:~$
dmbaturin claimed this task.