Bug 7490 - ipkg brand attach needs similar logic to pkgcreatezone for 'entire' incorporation
: ipkg brand attach needs similar logic to pkgcreatezone for 'entire' incorpora...
Status: RESOLVED FIXED
Product: pkg
zones
: unspecified
: ANY/Generic OpenSolaris
: P2 normal (vote)
: ---
Assigned To: Dan Price
: pkg/zones watcher
:
: 2009.06-04
:
:
: 6454
  Show dependency treegraph
 
Reported: 2009-03-18 19:25 UTC by Dan Price
Modified: 2009-04-29 15:50 UTC (History)
3 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Dan Price 2009-03-18 19:25:21 UTC
My recent work for bug 7335, bug 4771 and others cleaned up the process of
installing when the preferred publisher was out of whack.

Recently I was alerted to another situation-- a zone which was connected to the
'release' repo, detached, and then attached to (the same) system which had been
image-updated and along the way reconfigured to talk to the dev repo.  As a
result, 'pkg' couldn't find a place to get the "entire" incorporation it needed
in this logic in attach:

gz_entire=`pkg -R / list -Hv entire| nawk '{print $1}'`
if [ $? -ne 0 ]; then
        /usr/sbin/umount $zoneroot
        fail_fatal $f_nogzinc
fi
printf "$m_gzinc\n" $gz_entire

ngz_entire=`pkg -R $zoneroot list -Hv entire| nawk '{print $1}'`
if [ $? -ne 0 ]; then
        /usr/sbin/umount $zoneroot
        fail_fatal $f_nozinc
fi
printf "$m_zinc\n" $ngz_entire

if [ "$gz_entire" = "$ngz_entire" ]; then
        printf "$m_insync\n" $zonename $gz_entire
        echo $m_complete
        /usr/sbin/umount $zoneroot || fail_fatal "$f_umount"
        exit $ZONE_SUBPROC_OK
fi

In the short term, we need to make this a little more flexible, and
probably we can commonize in some code from pkgcreatezone to do so.

Longer term, I think we need to make a policy decision about how attach should
behave when it encounters this case.  More generally, there is a "mating up"
problem between a zone's set of publishers and the global zone's set of
publishers.
Comment 1 Dan Price 2009-04-29 01:22:53 UTC
I have a fix coded for this and it is in review and testing.
Comment 2 Dan Price 2009-04-29 15:50:31 UTC
Fixed in changeset fc73bc2d78ce9bc9dc216c88748396c0ff36e76c