sensu / sensu-omnibus

Build full-stack platform-specific Sensu packages
12 stars 16 forks source link

Solaris 10 packages fail to install cleanly due to missing directories #278

Closed cwjohnston closed 6 years ago

cwjohnston commented 6 years ago

User reports that Sensu packages do not install cleanly on Solaris 10 due to missing directories. See abbreviated output below:

Script started on Fri Sep 14 10:35:22 2018
# bash
examplehost# pkgadd -v -d sensu-1.4.2-3.i386.solaris.pkg sensu

Processing package instance <sensu> from </root/scripts/sensu-1.4.2-3.i386.solaris.pkg>

sensu(i386) 1.4.2-3
support@sensu.io
Using </opt> as the package base directory.
## Processing package information.
## Processing system information.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

This package contains scripts which will be executed with super-user
permission during the process of installing this package.

Do you want to continue with the installation of <sensu> [y,n,?] y

Installing sensu as <sensu>

## Installing part 1 of 1.
<<<OUTPUT OMITTED>>>
[ verifying class <none> ]
## Executing postinstall script.
+ set -e 
+ basename /var/sadm/pkg/sensu/install/postinstall 
PROGNAME=postinstall
ETC_DIR=/etc
INSTALLER_DIR=/opt/sensu
EMBEDDED_DIR=/opt/sensu/embedded
EMBEDDED_BIN_DIR=/opt/sensu/embedded/bin
SHARE_DIR=/opt/sensu/embedded/share
LOG_DIR=/var/log/sensu
PID_DIR=/var/run/sensu
TMP_DIR=/var/cache/sensu
CONFIG_DIR=/etc/sensu
CONFD_DIR=/etc/sensu/conf.d
PLUGINS_DIR=/etc/sensu/plugins
EXTENSIONS_DIR=/etc/sensu/extensions
DEFAULTS_DIR=/etc/default
LOG_FILE=/var/log/sensu/sensu-client.log
CONFIG_FILE=/etc/sensu/config.json
LOG_LEVEL=info
OPTIONS=-c /etc/sensu/config.json -d /etc/sensu/conf.d -e /etc/sensu/extensions -l /var/log/sensu/sensu-client.log -L info
SENSU_PATHS=/opt/sensu/embedded/bin:/sbin:/usr/sbin:/usr/bin:/usr/sadm/install/bin:/etc/sensu/plugins:
SENSU_GEM_PATHS=/opt/sensu/embedded/lib/ruby/gems/2.2.0:
SYSV_SCRIPTS_EXIST=false
SENSU_USER=sensu
SENSU_GROUP=sensu
+ create_sensu_user_group 
+ set +e 
+ grep ^sensu: /etc/group 
RC=1
+ set -e 
+ [ 1 != 0 ] 
+ groupadd sensu 
+ set +e 
+ grep ^sensu: /etc/passwd 
RC=1
+ set -e 
+ [ 1 != 0 ] 
+ useradd -d /opt/sensu -g sensu sensu 
+ passwd -N sensu 
passwd: password information changed for sensu
+ chown_sensu_dirs 
+ set -e 
+ chown -Rh 0:0 /opt/sensu 
+ chown -R sensu:sensu /etc/sensu 
chown: /etc/sensu: No such file or directory
pkgadd: ERROR: postinstall script did not complete successfully

Installation of <sensu> failed.
examplehost# exit
# ^D
script done on Fri Sep 14 10:36:32 2018

script done on Fri Sep 14 10:36:32 2018
amdprophet commented 6 years ago

This will be fixed by https://github.com/sensu/omnibus/pull/14.