Jira (PUP-11208) Puppet fails to install packages on Solaris if another pkg install is running

17 views
Skip to first unread message

Gabriel Nagy (Jira)

unread,
Aug 19, 2021, 7:18:03 AM8/19/21
to puppe...@googlegroups.com
Gabriel Nagy created an issue
 
Puppet / Bug PUP-11208
Puppet fails to install packages on Solaris if another pkg install is running
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2021/08/19 4:17 AM
Priority: Normal Normal
Reporter: Gabriel Nagy

Puppet fails hard if it tries to install a package on Solaris 11 while a pkg install command is already running in the background.

pkg install fails with the following error:

root@initial-holdup:~# pkg install nano
pkg: The image cannot be modified as it is currently in use by another package client.
root@initial-holdup:~# echo $?
7 

The same error can be reproduced in a zone set up, if you execute pkg install something concurrently on global and the zone (the following output is from a puppet manifest with the nano package resource):

Debug: Executing: '/usr/bin/pkg install --accept --sync-actuators-timeout 900 nano'
Error: Unable to update  Startup: Linked image publisher check ... Done
pkg: install failed (linked image exception(s)):A 'pubcheck-linked' operation failed for child 'zone:devzone' with an unexpected
return value of 7 and generated the following output:
pkg: The image cannot be modified as it is currently in use by another package client.
Error: /Stage[main]/Main/Package[nano]/ensure: change from 'absent' to 'present' failed: Unable to update  Startup: Linked image publisher check ... Done
pkg: install failed (linked image exception(s)):A 'pubcheck-linked' operation failed for child 'zone:devzone' with an unexpected
return value of 7 and generated the following output:
pkg: The image cannot be modified as it is currently in use by another package client. 

 

From the Solaris pkg manpages (https://docs.oracle.com/cd/E36784_01/html/E36870/pkg-1.html):

7: The image is currently in use by another process and cannot be modified.

 From a Solaris KB article (https://docs.oracle.com/cd/E53394_01/html/E54739/nomodimg.html):

 

Try your pkg command again after the current package process exits (process 26604 in this example). If the process does not exit quickly, use ptree -a, for example, to begin to examine the process.

 

We probably need to implement a similar defense in Puppet, that checks to see if the pkg command failed with error code 7 and keeps retrying the command a number of times (tbd how many times & how often).

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Ciprian Badescu (Jira)

unread,
Aug 30, 2021, 10:34:02 AM8/30/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Sep 8, 2021, 4:08:03 AM9/8/21
to puppe...@googlegroups.com
Ciprian Badescu updated an issue
Puppet fails hard if it tries to install a package on Solaris 11 while a {{pkg install}} command is already running in the background.

{{pkg install}} fails with the following error:
{code:java}root@initial-holdup:~# pkg install nano

pkg: The image cannot be modified as it is currently in use by another package client.
root@initial-holdup:~# echo $?
7 {code}

The same error can be reproduced in a zone set up, if you execute {{pkg install something}} concurrently on global and the zone (the following output is from a puppet manifest with the nano package resource):
{code:java}Debug: Executing: '/usr/bin/pkg install --accept --sync-actuators-timeout 900 nano'

Error: Unable to update  Startup: Linked image publisher check ... Done
pkg: install failed (linked image exception(s)):A 'pubcheck-linked' operation failed for child 'zone:devzone' with an unexpected
return value of 7 and generated the following output:
pkg: The image cannot be modified as it is currently in use by another package client.
Error: /Stage[main]/Main/Package[nano]/ensure: change from 'absent' to 'present' failed: Unable to update  Startup: Linked image publisher check ... Done
pkg: install failed (linked image exception(s)):A 'pubcheck-linked' operation failed for child 'zone:devzone' with an unexpected
return value of 7 and generated the following output:
pkg: The image cannot be modified as it is currently in use by another package client. {code}
 

From the Solaris pkg manpages ([https://docs.oracle.com/cd/E36784_01/html/E36870/pkg-1.html):]
{quote}7: The image is currently in use by another process and cannot be modified.
{quote}
 From a Solaris KB article ([https://docs.oracle.com/cd/E53394_01/html/E54739/nomodimg.html]):

 
{quote}Try your {{pkg}} command again after the current package process exits (process 26604 in this example). If the process does not exit quickly, use {{ptree -a}}, for example, to begin to examine the process.
{quote}
 

We probably need to implement a similar defense in Puppet, that checks to see if the {{pkg}} command failed with error code 7 and keeps retrying the command a number of times (tbd how many times & how often).
5 x 2^n; 1; 2; 4; 8; 16

Ciprian Badescu (Jira)

unread,
Sep 8, 2021, 4:13:03 AM9/8/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Sep 8, 2021, 4:17:02 AM9/8/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Sep 8, 2021, 5:30:03 AM9/8/21
to puppe...@googlegroups.com

Dorin Pleava (Jira)

unread,
Sep 22, 2021, 7:24:03 AM9/22/21
to puppe...@googlegroups.com

Gabriel Nagy (Jira)

unread,
Sep 28, 2021, 6:34:01 AM9/28/21
to puppe...@googlegroups.com
Gabriel Nagy updated an issue
Change By: Gabriel Nagy
Fix Version/s: PUP 7.12.0
Fix Version/s: PUP 6.25.0

Claire Cadman (Jira)

unread,
Oct 5, 2021, 8:12:03 AM10/5/21
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages