saltstack / saltstack/salt

Solarispkg module unable to install packages that require an answer file

Open
#51,567 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-testcase pending-changes severity-medium
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description of Issue/Question

Solaris svr4 packages that have an interactive script (i.e. require an answer file for silent install) cannot be installed via pkg.install.

Steps to Reproduce Issue

On Solaris, attempt to install a svr4 package which has an interactive script

salt-call pkg.install sources='[{"PACKAGE": "/path/to/package.pkg"}]'

The following error will be returned:

[ERROR   ] stderr: Interactive request script supplied by package
pkgadd: ERROR: request script did not complete successfully

Installation of <PACKAGE> was suspended (interaction required).
No changes were made to the system.
[ERROR   ] retcode: 5
[INFO    ] Executing command '/usr/bin/pkginfo -x' in directory '/root'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 212, in call
    ret['return'] = func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/salt/modules/solarispkg.py", line 374, in install
    info={'errors': errors, 'changes': ret}
CommandExecutionError: Problem encountered installing package(s). Additional info follows:

changes:
    ----------
errors:
    - Interactive request script supplied by package
      pkgadd: ERROR: request script did not complete successfully

      Installation of <PACKAGE> was suspended (interaction required).
      No changes were made to the system.
Error running 'pkg.install': Problem encountered installing package(s). Additional info follows:

changes:
    ----------
errors:
    - Interactive request script supplied by package
      pkgadd: ERROR: request script did not complete successfully

      Installation of <PACKAGE> was suspended (interaction required).
      No changes were made to the system.
Versions Report
Salt Version:
           Salt: 2018.3.3

Dependency Versions:
           cffi: Not Installed
       cherrypy: 5.1.0
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.3
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: 0.21.1
           Mako: 0.4.1
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 3.7.0
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.14 (default, Apr 17 2018, 04:59:16) [C]
   python-gnupg: Not Installed
         PyYAML: 3.09
          PyZMQ: 17.1.2
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.2.5

System Versions:
           dist:
         locale: 646
        machine: sun4v
        release: 5.11
         system: SunOS
        version: Not Installed

(Even on Solaris 11, some 3rd parties do not provide IPS based packages and svr4 style packages must still be installed (by overriding the pkg provider to use solarispkg for that packages install))

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with salt/modules/solarispkg.py and its install entry point, then reproduce the failure with the Solaris salt-call pkg.install command shown in the issue. Determine how an answer file should be supplied for interactive SVR4 packages, and verify that installation completes without the pkgadd interaction-required error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.