Page MenuHomeVyOS Platform

generate tech-support archive includes previous archives
Closed, ResolvedPublic

Description

Tested in VyOS 1.3.1-S1

The "generate tech-support archive" command creates an archive that includes the previous archives
Thus the size of the archive and the space occupied increase exponentially

0 time:

[email protected]:~$ ls -al /config/support/
total 8
drwxrwsr-x 2 root vyattacfg 4096 Mar 28 17:09 .
drwxrwsr-x 7 root vyattacfg 4096 Apr 19 12:19 ..

1st time:

[email protected]:~$ generate tech-support archive
Saving the archives...
Saved tech-support archival at /opt/vyatta/etc/config/support/vyos.tech-support-archive.2022-04-19-122230.tgz
[email protected]:~$ ls -l /config/support/
total 1156
-rw-r--r-- 1 root vyattacfg 1173615 Apr 19 12:22 vyos.tech-support-archive.2022-04-19-122230.tgz

2nd time:

[email protected]:~$ generate tech-support archive
Saving the archives...
Saved tech-support archival at /opt/vyatta/etc/config/support/vyos.tech-support-archive.2022-04-19-122240.tgz
[email protected]:~$ ls -al /config/support/
total 3452
-rw-r--r-- 1 root vyattacfg 1173615 Apr 19 12:22 vyos.tech-support-archive.2022-04-19-122230.tgz
-rw-r--r-- 1 root vyattacfg 2348638 Apr 19 12:22 vyos.tech-support-archive.2022-04-19-122240.tgz

3rd time:

[email protected]:~$ generate tech-support archive
Saving the archives...
Saved tech-support archival at /opt/vyatta/etc/config/support/vyos.tech-support-archive.2022-04-19-122259.tgz
[email protected]:~$ ls -l /config/support/
total 11364
-rw-r--r-- 1 root vyattacfg 1173615 Apr 19 12:22 vyos.tech-support-archive.2022-04-19-122230.tgz
-rw-r--r-- 1 root vyattacfg 2348638 Apr 19 12:22 vyos.tech-support-archive.2022-04-19-122240.tgz
-rw-r--r-- 1 root vyattacfg 8107512 Apr 19 12:23 vyos.tech-support-archive.2022-04-19-122259.tgz

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.3.1-S1
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

Mentioned In
1.3.3
1.3.1

Event Timeline

We can solve this problem in three ways.
Now the script (https://github.com/vyos/vyatta-op/blob/29703664633a20385a077083b4393738bdcb7409/scripts/tech-support-archive) creates up to 5 versions of support archives, after which it starts deleting the previous one. The problem is that each new version of the archives contains from 1 to 4 old archives. As a result, the archive can take up a lot of space.

Option one:
Save archives to a folder, that is not included in the folders saved by the script.

now:

DEFAULT_PATH=/opt/vyatta/etc/config/support

after:

DEFAULT_PATH=/usr/support (for example)

option two:
do not allow the script to save old versions.

now:

if (( count >= 5 )); then

after:

if (( count >= 1 )); then

option three:
combine options 1 and 2

Viacheslav changed the task status from Open to Needs testing.May 13 2022, 9:06 AM
Viacheslav added a project: VyOS 1.4 Sagitta.
[email protected]:~$ show version

Version:          VyOS 1.4-rolling-202205150217
Release train:    sagitta

Built by:         [email protected]
Built on:         Sun 15 May 2022 02:17 UTC
Build UUID:       c9d5dd31-17b6-4ed2-b41b-6019b4e7f863
Build commit ID:  d5445064aefe73

Architecture:     x86_64
Boot via:         livecd
System type:      Unknown hypervisor guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (i440FX + PIIX, 1996)
Hardware S/N:
Hardware UUID:    0e1d121f-6ec5-456a-b81a-bab893b8d619

Copyright:        VyOS maintainers and contributors
[email protected]:~$ ls -a -l /opt/vyatta/etc/config/support/
total 5860
drwxrwsr-x 1 root vyattacfg     140 May 16 01:27 .
drwxrwsr-x 1 root vyattacfg     140 May 16 01:26 ..
-rw-r--r-- 1 root vyattacfg 1191102 May 16 01:26 vyos.tech-support-archive.2022-05-16-012655.tgz
-rw-r--r-- 1 root vyattacfg 1194629 May 16 01:27 vyos.tech-support-archive.2022-05-16-012738.tgz
-rw-r--r-- 1 root vyattacfg 1197943 May 16 01:27 vyos.tech-support-archive.2022-05-16-012743.tgz
-rw-r--r-- 1 root vyattacfg 1201297 May 16 01:27 vyos.tech-support-archive.2022-05-16-012745.tgz
-rw-r--r-- 1 root vyattacfg 1204665 May 16 01:27 vyos.tech-support-archive.2022-05-16-012747.tgz

The command works well.