Description

This article explains why the request system software add command fails with "truncated or corrupted package: /var/tmp/package_name" error message and how to solve the issue.

 

Symptoms

Usually this error message is seen to occur when disk usage is high and close to full, but in some cases, the error can occur even there is enough disk space.

On EX2200 platform, the issue is seen from Junos OS release 12.2 and later if the image file is not in /var/tmp .

10.4R1.9(no error)-->11.4R1.6(no error)-->12.1R1.9(no error)-->12.2R1.8--(error)-->12.3R1.7--(error)-->12.3R2.5

Sample Logs

=================================================
Downgrade from 12.2R2.5 to 11.4R7.5 on EX2200
=================================================

[email protected]> start shell //image file is in "/tmp"
% cd /tmp
% pwd
/tmp
% ls
exautoconfig_tmp
jinstall-ex-2200-11.4R7.5-domestic-signed.tgz
partitions.spec
% cli
{master:0} // software add fail
[email protected]> request system software add /tmp/jinstall-ex-2200-11.4R7.5-domestic-signed.tgz

Checking pending install on fpc0

Validating on fpc0
truncated or corrupted package: /var/tmp/jinstall-ex-2200-11.4R7.5-domestic-signed.tgz  >>>Error occurred and downgrade/upgrade failed in 12.2 on EX2200

=================================================
Test result with 11.4R7 on EX2200
=================================================

[email protected]> start shell >> Software addition succeeds regardless of location of image file.
% cd /tmp
% ls
exautoconfig_tmp
jinstall-ex-2200-12.2R2.5-domestic-signed.tgz
partitions.spec
% cli
[email protected]>request system software add /tmp/jinstall-ex-2200-12.2R2.5-domestic-signed.tgz   /// Downgrade/upgrade succeeds in 11.4 on EX2200

NOTICE: Validating configuration against incoming-package.tgz.
NOTICE: Use the 'no-validate' option to skip this if desired.
WARNING: A reboot is required to install the software
WARNING: Use the 'request system reboot' command immediately

On EX4200, the issue does not happen even in Junos OS release 12.2.

===============================
Test result with 12.2 on EX4200
===============================

root@:RE:0% ls -al
total 167004
drwxrwxrwt 3 root wheel 512 Aug 25 17:40 .
drwxr-xr-x 24 root wheel 512 Aug 25 17:06 ..
-rw-r--r-- 1 root wheel 90 Aug 25 17:07 .clnpkg.LCK
-rw-r--r-- 1 root wheel 90 Aug 25 17:07 .pkg.LCK
drwxrwxr-x 2 root wheel 512 Aug 25 17:06 .snap
-rw-r--r-- 1 root wheel 250 Aug 25 17:08 exautoconfig_tmp
-rw-r--r-- 1 lab wheel 85436658 Aug 25 17:40 jinstall-ex-4200-11.4R5.7-domestic-signed.tgz
-rw-r--r-- 1 root wheel 393 Aug 25 17:06 partitions.spec

root>request system software add /tmp/jinstall-ex-4200-11.4R5.7-domestic-signed.tgz   /// Downgrade/upgrade succeeds even in 12.2 on EX4200

Checking pending install on fpc0

Validating on fpc0
Done with validate on all virtual chassis members

fpc0:

WARNING: A reboot is required to install the software
WARNING: Use the 'request system reboot' command immediately

 

Solution

The reason that the test result differs on different platforms is because disk space and RAM size are different in each of these platforms. EX devices such as EX3200 have less disk space and less RAM, but some EX devices have more disk space and RAM. Due to this, on some EX platforms, the installer has hardcoded /var/tmp as the safe location for images.

The only thing that is supported on all EX and QFX platforms is copying the image to /var/tmp and performing request system software add .

If the software upgrade/downgrade fails with this error message, move the image file to /var/tmp and try again.

 

To resolve the issue, move the image file to /var/tmp and try the upgrade or downgrade again.

[email protected] shell                                  //Same image files moved to "/var/tmp"
% mv /tmp/jinstall-ex-2200-11.4R7.5-domestic-signed.tgz /var/tmp/
% cd /var/tmp
% ls
gres-tp
jinstall-ex-2200-11.4R7.5-domestic-signed.tgz
krt_gencfg_filter.txt
mchassis-install.tgz
rtsdb
% cli
{master:0}
[email protected]>request system software add /var/tmp/jinstall-ex-2200-11.4R7.5-domestic-signed.tgz

Checking pending install on fpc0

Validating on fpc0
/var/tmp/jinstall-ex-2200-11.4R7.5-domestic-signed.tgzDone with validate on all virtual chassis members

fpc0:

WARNING: A reboot is required to install the software
WARNING: Use the 'request system reboot' command immediately     // Software addition succeeds without error message.

 

Modification History

2020-08-04: Article reviewed for accuracy, no changes required; article accurate and valid