Zones not booting due to a stale repository

book

Article ID: 100034069

calendar_today

Updated On:

Description

Error Message

file protocol error: code: 22 reason: The path '/mnt/VRTS/VRTSpkgs.p5p' does not contain a valid package repository.
Repository URL: 'file:///mnt/VRTS/VRTSpkgs.p5p'. (happened 3 times)

Excerpts:
root@ash-global-zone-1:~# zoneadm -z ash-local-zone attach
Progress being logged to /var/log/zones/zoneadm.20170428T000158Z.ash-local-zone.attach
Installing: Using existing zone boot environment
Zone BE root dataset: zp-ash-local-zone/rpool/ROOT/solaris-1
Cache: Using /var/pkg/publisher.
Updating non-global zone: Linking to image /.
Processing linked: 1/1 done
Result: Attach Failed.
Log saved in non-global zone as /zones/ash-local-zone/root/var/log/zones/zoneadm.20170428T000158Z.ash-local-zone.attach

ERROR:
Attach failed. This zone must be attached with the -u or -U option.

root@ash-global-zone-1:~# zoneadm -z ash-local-zone attach -U
Progress being logged to /var/log/zones/zoneadm.20170428T142654Z.ash-local-zone.attach
Converting detached zone boot environment 'solaris-1'.
Installing: Using existing zone boot environment
Zone BE root dataset: zp-ash-local-zone/rpool/ROOT/solaris-1
Cache: Using /var/pkg/publisher.
Updating image format
Image format already current.
ERROR: Updating image format failed
Log saved in non-global zone as /zones/ash-local-zone/root/var/log/zones/zoneadm.20170428T142654Z.ash-local-zone.attach
zoneadm: zone 'ash-local-zone': NOTICE: attach partially succeeded: zone transitioning to unavailable state

Unable to contact valid package repository
Encountered the following error(s):
Unable to contact any configured publishers.
This is likely a network configuration problem.
file protocol error: code: 22 reason: The path '/mnt/VRTS/VRTSpkgs.p5p' does not contain a valid package repository.
Repository URL: 'file:///mnt/VRTS/VRTSpkgs.p5p'. (happened 3 times)

[Fri Apr 28 10:27:20 EDT 2017] ERROR: Updating image format failed
[Fri Apr 28 10:27:20 EDT 2017] Exiting with exit code 252
[Fri Apr 28 10:27:20 EDT 2017] ==== Completed: /usr/lib/brand/solaris/attach ash-local-zone /zones/ash-local-zone -U ====

Resolution

1. Bring up the local zone on the global zone where it comes up online without any issues. In this example, the global zone is ash-global-zone-1 and local zone is ash-local-zone.

2. On that global-zone (ash-global-zone-1), ensure there is no Veritas publisher
root@ash-global-zone-1:~# pkg publisher
PUBLISHER TYPE STATUS P LOCATION
GSL origin online F https://********
solaris origin online F file:///*******
 
If you have the Veritas publisher on the global-zone, then unset it.
 
 
3. Inside the local-zone, disable zones-proxy-client
root@ash-local-zone:~# svcadm disable svc:/application/pkg/zones-proxy-client:default
root@ash-local-zone:~# svcs svc:/application/pkg/zones-proxy-client:default
STATE STIME FMRI
disabled 4:47:07 svc:/application/pkg/zones-proxy-client:default
 

4. On the global zone, disable zones-proxyd and the system-repository.
root@ash-global-zone-1:~# svcadm disable svc:/application/pkg/zones-proxyd:default
root@ash-global-zone-1:~# svcs svc:/application/pkg/zones-proxyd:default
STATE STIME FMRI
disabled 2:52:30 svc:/application/pkg/zones-proxyd:default

root@ash-global-zone-1:~# svcadm disable svc:/application/pkg/system-repository:default
root@ash-global-zone-1:~# svcs svc:/application/pkg/system-repository:default
STATE STIME FMRI
disabled 2:53:58 svc:/application/pkg/system-repository:default


5. From the global zone enable both the system-repository and the zones-proxyd services.
root@ash-global-zone-1:~# svcadm enable svc:/application/pkg/system-repository:default
root@ash-global-zone-1:~# svcadm enable svc:/application/pkg/zones-proxyd:default

root@ash-global-zone-1:~# svcs svc:/application/pkg/zones-proxyd:default
STATE STIME FMRI
online 2:55:01 svc:/application/pkg/zones-proxyd:default
root@ash-global-zone-1:~# svcs svc:/application/pkg/system-repository:default
STATE STIME FMRI
online 2:54:51 svc:/application/pkg/system-repository:default
 
 
6. Inside the local-zone, enable the zones-proxy-client.
root@ash-local-zone:~# svcadm enable svc:/application/pkg/zones-proxy-client:default
root@ash-local-zone:~# svcs svc:/application/pkg/zones-proxy-client:default
STATE STIME FMRI
online 4:55:55 svc:/application/pkg/zones-proxy-client:default
 

7. From the other global-zone (where the local-zone is NOT online), if you have Veritas publisher set, unset it. In this example, the global zone is ash-global-zone-2 and the local zone is ash-local-zone.
root@ash-global-zone-2:~# pkg publisher
PUBLISHER TYPE STATUS P LOCATION
GSL origin online F https:///**********
Veritas origin online F file:///********
solaris origin online F file:///***********

root@ash-global-zone-2:~# pkg unset-publisher Veritas
Updating package cache 1/1
root@ash-global-zone-2:~# pkg publisher
PUBLISHER TYPE STATUS P LOCATION
GSL origin online F https://***********
solaris origin online F file:///***********
 

8. Disable the system-repository and zones-proxyd.
root@ash-global-zone-2:~# svcadm disable svc:/application/pkg/system-repository:default
root@ash-global-zone-2:~# svcadm disable svc:/application/pkg/zones-proxyd:default

root@ash-global-zone-2:~# svcs svc:/application/pkg/system-repository:default
STATE STIME FMRI
disabled 9:57:58 svc:/application/pkg/system-repository:default
root@ash-global-zone-2:~# svcs svc:/application/pkg/zones-proxyd:default
STATE STIME FMRI
offline 10:01:07 svc:/application/pkg/zones-proxyd:default
 

9. On the global zone, enable both the system-repository and zones-proxyd services.
root@ash-global-zone-2:~# svcadm enable svc:/application/pkg/system-repository:default
root@ash-global-zone-2:~# svcadm enable svc:/application/pkg/zones-proxyd:default

root@ash-global-zone-2:~# svcs svc:/application/pkg/system-repository:default
STATE STIME FMRI
online 10:01:37 svc:/application/pkg/system-repository:default
root@ash-global-zone-2:~# svcs svc:/application/pkg/zones-proxyd:default
STATE STIME FMRI
online 10:01:37 svc:/application/pkg/zones-proxyd:default
 

10. Try failing over to this global-zone: ash-global-zone-2. The zone attach should now work.
 

Issue/Introduction

Zone do not boot because "the path '/mnt/VRTS/VRTSpkgs.p5p' does not contain a valid package repository."