Page MenuHomeVyOS Platform

lsb_release reports the system to be debian
Closed, ResolvedPublicBUG

Description

I'm currently testing migration from 1.4.0 to 1.4.1. I'm using puppet to automatically configure my routers. Puppet uses the "lsb_release" command in order to determine the operating system and version.

Since upgrading to 1.4.1 the OS is falsely identified as being a (plain) debian. This breaks current automation, as the routers cannot be identified as running VyOS anymore.

With 1.4.0:

vyos@myhostname:~$ sudo lsb_release -a
No LSB modules are available.
Distributor ID:	VyOS
Description:	VyOS 1.4.0 (sagitta)
Release:	1.4.0
Codename:	bookworm
vyos@myhostname:~$ sudo lsb_release -^C
vyos@myhostname:~$ show version 
Version:          VyOS 1.4.0
Release train:    sagitta
Release flavor:   generic

Built by:         Sentrium S.L.
Built on:         Tue 04 Jun 2024 09:23 UTC
Build UUID:       5e6ae0c4-4d17-4b69-9247-b4ba44a3e3c2
Build commit ID:  35dd8ae6522c78-dirty

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (i440FX + PIIX, 1996)
Hardware S/N:     
Hardware UUID:    71e05acc-0be2-490f-bb1f-dab42c96fc2e

Copyright:        VyOS maintainers and contributors

With 1.4.1:

vyos@myhostname:~$ sudo lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 12 (bookworm)
Release:	12
Codename:	bookworm
vyos@myhostname:~$ show version
Version:          VyOS 1.4.1
Release train:    sagitta
Release flavor:   generic

Built by:         VyOS Networks Iberia S.L.U.
Built on:         Thu 19 Dec 2024 16:39 UTC
Build UUID:       857ab426-c3d8-4254-b23a-0ad62a45ecc7
Build commit ID:  98c72c5c45a7a1-dirty

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (i440FX + PIIX, 1996)
Hardware S/N:     
Hardware UUID:    71e05acc-0be2-490f-bb1f-dab42c96fc2e

Copyright:        VyOS maintainers and contributors

Details

Version
1.4.1
Is it a breaking change?
Behavior change
Issue type
Bug (incorrect behavior)

Event Timeline

We found the source of the problem, thanks for testing! The only officially supported way to retrieve version information is show version or its API equivalent but we should certainly play nice with external tools even if we don't officially support them.

We'll include a fix in the upcoming 1.4.2 release.

Meanwhile, you can use this "hotfix" to allow 1.4.1 machines to be managed by Puppet:

vyos@vyos:~$ sudo cp /usr/lib/os-release /etc/os-release 

vyos@vyos:~$ sudo lsb_release -a
No LSB modules are available.
Distributor ID:	VyOS
Description:	VyOS 1.4.1 (sagitta)
Release:	1.4.1
Codename:	bookworm
c-po changed the task status from Open to In progress.Thu, Jan 2, 9:52 PM
c-po claimed this task.
c-po triaged this task as Normal priority.
c-po edited projects, added VyOS 1.4 Sagitta (1.4.2); removed VyOS 1.4 Sagitta (1.4.1).

@fetzerms thanks for reporting - this fix slipped through and will be part of 1.4.2

Thank you! I'll apply the workaround to keep testing my things :-)

Smoketests will be extended to cover this case.