[OmniOS-discuss] r151008 ipkg zone attach problems
Lauri Tirkkonen
lotheac at iki.fi
Sat Dec 7 16:52:59 UTC 2013
I noticed that I could not attach my non-global zones under r151008
after upgrading from r151006. I made a couple VMs to reproduce, and it
turns out that ipkg zone attach is broken on r151008 even on a fresh
install - I can install a zone and it will work, but if I detach it, it
cannot be reattached. It fails with:
[December 7, 2013 05:53:03 PM UTC] Log File: /var/tmp/ngz.attach_log.WcaOqg
[December 7, 2013 05:53:08 PM UTC] Attach Path: /zones/ngz/root
[December 7, 2013 05:53:08 PM UTC] Attach ZFS Dataset: rpool/zones/ngz/ROOT/zbe
[December 7, 2013 05:53:08 PM UTC] existing
[December 7, 2013 05:53:08 PM UTC] Installing: Using pre-existing data in zonepath
[December 7, 2013 05:53:08 PM UTC] Sanity Check: Passed. Looks like an OpenSolaris system.
Unable to get preferred publisher information for zone 'global'.
brand-specific usage: attach [-a archive] [-d dataset] [-n] [-r zfs-recv] [-u]
The -a archive option specifies a tar file or cpio archive.
The -d dataset option specifies an existing dataset.
The -r zfs-recv option receives the output of a 'zfs send' command
of an existing zone root dataset.
The -u option indicates that the software should be updated to match
the current host.
[December 7, 2013 05:53:12 PM UTC] Result: Attach Failed.
I was able to figure out the cause of this: the /usr/lib/brand/ipkg/attach
script tries to get a 'preferred' publisher (seems to be called syspub
in some places), but there are none. A little detective work then leads me to
https://github.com/postwait/pkg5/commit/0675d74fa0a6bf32f714d7f8da8e980868ac73ae
which places comments in the ipkg zone creation script indicating that
'preferred publisher' is not a concept in newer pkg5 (from diffing the
ipkg brand directory it looks like this change was not in r151006, but
is in r151008)
So, blindly applying that knowledge to the attach script as well (remove
the 'preferred' check; rudimentary patch attached), I am able to
reattach an r151008 zone to a r151008 gz. However, trying to attach -u
an r151006 zone to r151008 still fails:
[December 7, 2013 06:12:39 PM UTC] Log File: /var/tmp/ngz.attach_log.spaWcf
[December 7, 2013 06:12:45 PM UTC] Attach Path: /zones/ngz/root
[December 7, 2013 06:12:45 PM UTC] Attach ZFS Dataset: rpool/zones/ngz/ROOT/zbe
[December 7, 2013 06:12:45 PM UTC] existing
[December 7, 2013 06:12:45 PM UTC] Installing: Using pre-existing data in zonepath
[December 7, 2013 06:12:45 PM UTC] Sanity Check: Passed. Looks like an OpenSolaris system.
[December 7, 2013 06:12:47 PM UTC] Preferred global publisher: omnios
[December 7, 2013 06:12:48 PM UTC] Global zone version: entire at 11,5.11-0.151008:20131205T195242Z
[December 7, 2013 06:12:48 PM UTC] Non-Global zone version: entire at 11,5.11-0.151006:20130507T204959Z
[December 7, 2013 06:12:48 PM UTC] Cache: Using /var/pkg/publisher.
[December 7, 2013 06:12:48 PM UTC] Updating non-global zone: Output follows
pkg install: No matching version of entire can be installed:
Reject: pkg://omnios/entire@11,5.11-0.151008:20131205T195242Z
Reason: All versions matching 'require' dependency pkg:/incorporation/jeos/omnios-userland are rejected
Reject: pkg://omnios/incorporation/jeos/omnios-userland@11,5.11-0.151004:20121024T180535Z
pkg://omnios/incorporation/jeos/omnios-userland@11,5.11-0.151004:20130208T215446Z
pkg://omnios/incorporation/jeos/omnios-userland@11,5.11-0.151004:20130304T155348Z
pkg://omnios/incorporation/jeos/omnios-userland@11,5.11-0.151004:20130321T181944Z
pkg://omnios/incorporation/jeos/omnios-userland@11,5.11-0.151004:20130416T172708Z
pkg://omnios/incorporation/jeos/omnios-userland@11,5.11-0.151006:20130506T214442Z
pkg://omnios/incorporation/jeos/omnios-userland@11,5.11-0.151006:20130716T202721Z
Reason: Excluded by proposed incorporation 'entire'
Newer version pkg://omnios/incorporation/jeos/omnios-userland@11,5.11-0.151006:20131030T205312Z is already installed
This version is excluded by installed incorporation pkg://omnios/incorporation/jeos/omnios-userland@11,5.11-0.151006:20131030T205312Z
Reject: pkg://omnios/incorporation/jeos/omnios-userland@11,5.11-0.151006:20131030T205312Z
Reason: Excluded by proposed incorporation 'entire'
This version is excluded by installed incorporation pkg://omnios/incorporation/jeos/omnios-userland@11,5.11-0.151006:20131030T205312Z
Reject: pkg://omnios/incorporation/jeos/omnios-userland@11,5.11-0.151008:20131204T231613Z
pkg://omnios/incorporation/jeos/omnios-userland@11,5.11-0.151008:20131205T191259Z
pkg://omnios/incorporation/jeos/omnios-userland@11,5.11-0.151008:20131205T195253Z
pkg://omnios/incorporation/jeos/omnios-userland@11,5.11-0.151008:20131205T223747Z
pkg://omnios/incorporation/jeos/omnios-userland@11,5.11-0.151008:20131206T160517Z
Reason: This version is excluded by installed incorporation pkg://omnios/incorporation/jeos/omnios-userland@11,5.11-0.151006:20131030T205312Z
[December 7, 2013 06:12:55 PM UTC] ERROR: Could not update attaching zone
[December 7, 2013 06:13:00 PM UTC] Result: Attach Failed.
Which looks like it's only trying to update entire, not omnios-userland.
But it's weird, because entire has these dependencies:
depend fmri=incorporation/jeos/omnios-userland at 11,5.11-0.151008 type=incorporate
depend fmri=incorporation/jeos/omnios-userland type=require
Just guessing here, but perhaps the require dependency needs to have an
explicit branch version as well?
An explicit 'pkg -R /zones/ngz/root update entire at latest
omnios-userland at latest' before attaching works around this (but not the
'unable to get preferred publisher information' issue).
--
Lauri Tirkkonen | +358 50 5341376 | lotheac @ IRCnet
-------------- next part --------------
diff --git a/src/brand/attach b/src/brand/attach
index e754c2c..a0e0abe 100644
--- a/src/brand/attach
+++ b/src/brand/attach
@@ -256,10 +256,8 @@ get_preferred_publisher() {
for key in ${!publishers[*]}; do
eval publisher="${publishers[$key]}"
- if [[ ${publisher.preferred} == "true" ]]; then
- print ${key}
- return 0
- fi
+ print ${key}
+ return 0
done
return 1
}
More information about the OmniOS-discuss
mailing list