voxpupuli / puppet-elasticsearch

Elasticsearch Puppet module
Apache License 2.0
404 stars 476 forks source link

undefined method `scan' for :absent:Symbol #966

Closed aursu closed 6 years ago

aursu commented 6 years ago

Bug description

Unable to uninstall elasticsearch via puppet.

Steps to reproduce;

  1. Install service (initial setup)

        class { 'elasticsearch':
            version => '6.3.0',
        }
    
        elasticsearch::instance { 'es-01':
            config => {
                'node.name'                        => "\${HOSTNAME}",
                'cluster.name'                     => 'cls-search',
                'network.host'                     => 'IPv4 internal address',
                'discovery.zen.ping.unicast.hosts' => ['127.0.0.1', '[::1]'],
            },
        }
  2. We have made decision to use Dockerized elasticsearch instance. Therefore server cleanup should look like:

        class { 'elasticsearch':
            ensure        => absent,
        }

    But actually deb package post installation script returns error code 8 therefore got next error:

    Error: Execution of '/usr/bin/apt-get -y -q remove --purge elasticsearch' returned 100: Reading package lists...
    Building dependency tree...
    Reading state information...
    The following packages were automatically installed and are no longer required:
    libtomcrypt0 libtommath0 timelimit
    Use 'apt-get autoremove' to remove them.
    The following packages will be REMOVED:
    elasticsearch*
    0 upgraded, 0 newly installed, 1 to remove and 29 not upgraded.
    After this operation, 143 MB disk space will be freed.
    (Reading database ... 97714 files and directories currently installed.)
    Removing elasticsearch (6.3.0) ...
    Stopping elasticsearch service... * Stopping Elasticsearch Server
    ...done.
    OK
    update-rc.d: /etc/init.d/elasticsearch exists during rc.d purge (use -f to force)
    Deleting log directory... OK
    Purging configuration files for elasticsearch (6.3.0) ...
    userdel: user elasticsearch is currently used by process 53798
    dpkg: error processing package elasticsearch (--purge):
    subprocess installed post-removal script returned error exit status 8
    Errors were encountered while processing:
    elasticsearch
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Error: /Stage[main]/Elasticsearch::Package/Package[elasticsearch]/ensure: change from '6.3.0' to 'purged' failed: Execution of '/usr/bin/apt-get -y -q remove --purge elasticsearch' returned 100: Reading package lists...
    Building dependency tree...
    Reading state information...
    The following packages were automatically installed and are no longer required:
    libtomcrypt0 libtommath0 timelimit
    Use 'apt-get autoremove' to remove them.
    The following packages will be REMOVED:
    elasticsearch*
    0 upgraded, 0 newly installed, 1 to remove and 29 not upgraded.
    After this operation, 143 MB disk space will be freed.
    (Reading database ... 97714 files and directories currently installed.)
    Removing elasticsearch (6.3.0) ...
    Stopping elasticsearch service... * Stopping Elasticsearch Server
    ...done.
    OK
    update-rc.d: /etc/init.d/elasticsearch exists during rc.d purge (use -f to force)
    Deleting log directory... OK
    Purging configuration files for elasticsearch (6.3.0) ...
    userdel: user elasticsearch is currently used by process 53798
    dpkg: error processing package elasticsearch (--purge):
    subprocess installed post-removal script returned error exit status 8
    Errors were encountered while processing:
    elasticsearch
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Info: Class[Elasticsearch]: Unscheduling all events on Class[Elasticsearch]
    Info: Stage[main]: Unscheduling all events on Stage[main]
  3. Try to fix (stop service):

        class { 'elasticsearch':
            ensure        => 'absent',
        }
    
        elasticsearch::instance {'es-01':
            ensure  => 'absent',
        }

But got this error which look like actual bug

Info: Applying configuration version '1531147798'
Error: undefined method `scan' for :absent:Symbol
Error: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/Elasticsearch::Service[es-01]/Elasticsearch::Service::Init[es-01]/Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01]/content: change from "#!/bin/bash\n#\n# /etc/init.d/elasticsearch-es-01 -- startup script for Elasticsearch\n#\n### BEGIN INIT INFO\n# Provides:          elasticsearch-es-01\n# Required-Start:    \$network \$remote_fs \$named\n# Required-Stop:     \$network \$remote_fs \$named\n# Default-Start:     2 3 4 5\n# Default-Stop:      0 1 6\n# Short-Description: Starts elasticsearch-es-01\n# Description:       Starts elasticsearch-es-01 using start-stop-daemon\n### END INIT INFO\n\nPATH=/bin:/usr/bin:/sbin:/usr/sbin\nNAME=elasticsearch-es-01\nDESC=\"Elasticsearch Server es-01\"\nDEFAULT=/etc/default/\$NAME\n\nif [ `id -u` -ne 0 ]; then\n\techo \"You need root privileges to run this script\"\n\texit 1\nfi\n\n\n. /lib/lsb/init-functions\n\nif [ -r /etc/default/rcS ]; then\n\t. /etc/default/rcS\nfi\n\n\n# The following variables can be overwritten in \$DEFAULT\n\n# Run Elasticsearch as this user ID and group ID\nES_USER=elasticsearch\nES_GROUP=elasticsearch\n\n# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not defined in \$DEFAULT)\nJDK_DIRS=\"/usr/lib/jvm/java-8-oracle /usr/lib/jvm/java-8-openjdk /usr/lib/jvm/java-8-openjdk-amd64/ /usr/lib/jvm/java-8-openjdk-armhf /usr/lib/jvm/java-8-openjdk-i386/ /usr/lib/jvm/java-7-oracle /usr/lib/jvm/java-7-openjdk /usr/lib/jvm/java-7-openjdk-amd64/ /usr/lib/jvm/java-7-openjdk-armhf /usr/lib/jvm/java-7-openjdk-i386/ /usr/lib/jvm/java-6-sun /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-openjdk-amd64 /usr/lib/jvm/java-6-openjdk-armhf /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/default-java\"\n\n\n# Look for the right JVM to use\nfor jdir in \$JDK_DIRS; do\n    if [ -r \"\$jdir/bin/java\" -a -z \"\${JAVA_HOME}\" ]; then\n        JAVA_HOME=\"\$jdir\"\n    fi\ndone\nexport JAVA_HOME\n\n# Directory where the Elasticsearch binary distribution resides\n#ES_HOME=/usr/share/\$NAME\n\n# Additional Java OPTS\n#ES_JAVA_OPTS=\n\n# Maximum number of open files\nMAX_OPEN_FILES=65536\n\n# Maximum amount of locked memory\n#MAX_LOCKED_MEMORY=\n\n# Elasticsearch log directory\n#LOG_DIR=/var/log/\$NAME\n\n# Elasticsearch data directory\n#DATA_DIR=/var/lib/\$NAME\n\n# Elasticsearch work directory\nWORK_DIR=/tmp/\$NAME\n\n# Elasticsearch configuration directory\n#CONF_DIR=/etc/\$NAME\n\n# Maximum number of VMA (Virtual Memory Areas) a process can own\nMAX_MAP_COUNT=262144\n\n# End of variables that can be overwritten in \$DEFAULT\n\n# overwrite settings from default file\nif [ -f \"\$DEFAULT\" ]; then\n\t. \"\$DEFAULT\"\nfi\n\n# Define other required variables\nPID_FILE=/var/run/\$NAME.pid\nDAEMON=\$ES_HOME/bin/elasticsearch\nDAEMON_OPTS=\"-d -p \$PID_FILE \"\n\nexport ES_HEAP_SIZE\nexport ES_HEAP_NEWSIZE\nexport ES_DIRECT_SIZE\nexport ES_JAVA_OPTS\nexport ES_JVM_OPTIONS\nexport ES_CLASSPATH\nexport ES_INCLUDE\nexport ES_PATH_CONF\nexport ES_GC_LOG_FILE\n\nif [ ! -x \"\$DAEMON\" ]; then\n\techo \"The elasticsearch startup script does not exists or it is not executable, tried: \$DAEMON\"\n\texit 1\nfi\n\ncheckJava() {\n\tif [ -x \"\$JAVA_HOME/bin/java\" ]; then\n\t\tJAVA=\"\$JAVA_HOME/bin/java\"\n\telse\n\t\tJAVA=`which java`\n\tfi\n\n\tif [ ! -x \"\$JAVA\" ]; then\n\t\techo \"Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME\"\n\t\texit 1\n\tfi\n}\n\ncase \"\$1\" in\n  start)\n\tcheckJava\n\n\tlog_daemon_msg \"Starting \$DESC\"\n\n\tpid=`pidofproc -p \$PID_FILE elasticsearch`\n\tif [ -n \"\$pid\" ] ; then\n\t\tlog_begin_msg \"Already running.\"\n\t\tlog_end_msg 0\n\t\texit 0\n\tfi\n\n\t# Prepare environment\n\tfor DIR in \"\$DATA_DIR\" \"\$LOG_DIR\" \"\$WORK_DIR\"; do\n\t\t[ ! -z \"\$DIR\" ] && mkdir -p \"\$DIR\" && chown \"\$ES_USER\":\"\$ES_GROUP\" \"\$DIR\"\n\tdone\n\tif [ -n \"\$PID_FILE\" ] && [ ! -e \"\$PID_FILE\" ]; then\n\t\ttouch \"\$PID_FILE\" && chown \"\$ES_USER\":\"\$ES_GROUP\" \"\$PID_FILE\"\n\tfi\n\n\tif [ -n \"\$MAX_OPEN_FILES\" ]; then\n\t\tulimit -n \$MAX_OPEN_FILES\n\tfi\n\n\tif [ -n \"\$MAX_LOCKED_MEMORY\" ]; then\n\t\tulimit -l \$MAX_LOCKED_MEMORY\n\tfi\n\n\tif [ -n \"\$MAX_MAP_COUNT\" -a -f /proc/sys/vm/max_map_count ]; then\n\t\tsysctl -q -w vm.max_map_count=\$MAX_MAP_COUNT\n\tfi\n\n\t# Start Daemon\n\tstart-stop-daemon -d \$ES_HOME --start --user \"\$ES_USER\" -c \"\$ES_USER\" --pidfile \"\$PID_FILE\" --exec \$DAEMON -- \$DAEMON_OPTS\n\treturn=\$?\n\tif [ \$return -eq 0 ]; then\n\t\ti=0\n\t\ttimeout=10\n\t\t# Wait for the process to be properly started before exiting\n\t\tuntil { kill -0 `cat \"\$PID_FILE\"`; } >/dev/null 2>&1\n\t\tdo\n\t\t\tsleep 1\n\t\t\ti=\$((\$i + 1))\n\t\t\tif [ \$i -gt \$timeout ]; then\n\t\t\t\tlog_end_msg 1\n\t\t\t\texit 1\n\t\t\tfi\n\t\tdone\n\tfi\n\tlog_end_msg \$return\n\texit \$return\n\t;;\n  stop)\n\tlog_daemon_msg \"Stopping \$DESC\"\n\n\tif [ -f \"\$PID_FILE\" ]; then\n\t\tstart-stop-daemon --stop --pidfile \"\$PID_FILE\" \\\n\t\t\t--user \"\$ES_USER\" \\\n\t\t\t--quiet \\\n\t\t\t--retry forever/TERM/20 > /dev/null\n\t\tif [ \$? -eq 1 ]; then\n\t\t\tlog_progress_msg \"\$DESC is not running but pid file exists, cleaning up\"\n\t\telif [ \$? -eq 3 ]; then\n\t\t\tPID=\"`cat \$PID_FILE`\"\n\t\t\tlog_failure_msg \"Failed to stop \$DESC (pid \$PID)\"\n\t\t\texit 1\n\t\tfi\n\t\trm -f \"\$PID_FILE\"\n\telse\n\t\tlog_progress_msg \"(not running)\"\n\tfi\n\tlog_end_msg 0\n\t;;\n  status)\n\tstatus_of_proc -p \$PID_FILE elasticsearch elasticsearch && exit 0 || exit \$?\n\t;;\n  restart|force-reload)\n\tif [ -f \"\$PID_FILE\" ]; then\n\t\t\$0 stop\n\tfi\n\t\$0 start\n\t;;\n  *)\n\tlog_success_msg \"Usage: \$0 {start|stop|restart|force-reload|status}\"\n\texit 1\n\t;;\nesac\n\nexit 0\n" to "#!/bin/bash\n#\n# /etc/init.d/elasticsearch-<%= @resource[:instance] %> -- startup script for Elasticsearch\n#\n### BEGIN INIT INFO\n# Provides:          elasticsearch-<%= @resource[:instance] %>\n# Required-Start:    \$network \$remote_fs \$named\n# Required-Stop:     \$network \$remote_fs \$named\n# Default-Start:     2 3 4 5\n# Default-Stop:      0 1 6\n# Short-Description: Starts elasticsearch-<%= @resource[:instance] %>\n# Description:       Starts elasticsearch-<%= @resource[:instance] %> using start-stop-daemon\n### END INIT INFO\n\nPATH=/bin:/usr/bin:/sbin:/usr/sbin\nNAME=elasticsearch-<%= @resource[:instance] %>\nDESC=\"Elasticsearch Server <%= @resource[:instance] %>\"\nDEFAULT=/etc/default/\$NAME\n\nif [ `id -u` -ne 0 ]; then\n\techo \"You need root privileges to run this script\"\n\texit 1\nfi\n\n\n. /lib/lsb/init-functions\n\nif [ -r /etc/default/rcS ]; then\n\t. /etc/default/rcS\nfi\n\n\n# The following variables can be overwritten in \$DEFAULT\n\n# Run Elasticsearch as this user ID and group ID\nES_USER=elasticsearch\nES_GROUP=elasticsearch\n\n# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not defined in \$DEFAULT)\nJDK_DIRS=\"/usr/lib/jvm/java-8-oracle /usr/lib/jvm/java-8-openjdk /usr/lib/jvm/java-8-openjdk-amd64/ /usr/lib/jvm/java-8-openjdk-armhf /usr/lib/jvm/java-8-openjdk-i386/ /usr/lib/jvm/java-7-oracle /usr/lib/jvm/java-7-openjdk /usr/lib/jvm/java-7-openjdk-amd64/ /usr/lib/jvm/java-7-openjdk-armhf /usr/lib/jvm/java-7-openjdk-i386/ /usr/lib/jvm/java-6-sun /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-openjdk-amd64 /usr/lib/jvm/java-6-openjdk-armhf /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/default-java\"\n\n\n# Look for the right JVM to use\nfor jdir in \$JDK_DIRS; do\n    if [ -r \"\$jdir/bin/java\" -a -z \"\${JAVA_HOME}\" ]; then\n        JAVA_HOME=\"\$jdir\"\n    fi\ndone\nexport JAVA_HOME\n\n# Directory where the Elasticsearch binary distribution resides\n#ES_HOME=/usr/share/\$NAME\n\n# Additional Java OPTS\n#ES_JAVA_OPTS=\n\n# Maximum number of open files\nMAX_OPEN_FILES=65536\n\n# Maximum amount of locked memory\n#MAX_LOCKED_MEMORY=\n\n# Elasticsearch log directory\n#LOG_DIR=/var/log/\$NAME\n\n# Elasticsearch data directory\n#DATA_DIR=/var/lib/\$NAME\n\n# Elasticsearch work directory\nWORK_DIR=/tmp/\$NAME\n\n# Elasticsearch configuration directory\n#CONF_DIR=/etc/\$NAME\n\n# Maximum number of VMA (Virtual Memory Areas) a process can own\nMAX_MAP_COUNT=262144\n\n# End of variables that can be overwritten in \$DEFAULT\n\n# overwrite settings from default file\nif [ -f \"\$DEFAULT\" ]; then\n\t. \"\$DEFAULT\"\nfi\n\n# Define other required variables\nPID_FILE=/var/run/\$NAME.pid\nDAEMON=\$ES_HOME/bin/elasticsearch\nDAEMON_OPTS=\"-d -p \$PID_FILE <%= opt_flags.join(' ') %>\"\n\nexport ES_HEAP_SIZE\nexport ES_HEAP_NEWSIZE\nexport ES_DIRECT_SIZE\nexport ES_JAVA_OPTS\nexport ES_JVM_OPTIONS\nexport ES_CLASSPATH\nexport ES_INCLUDE\nexport ES_PATH_CONF\nexport ES_GC_LOG_FILE\n\nif [ ! -x \"\$DAEMON\" ]; then\n\techo \"The elasticsearch startup script does not exists or it is not executable, tried: \$DAEMON\"\n\texit 1\nfi\n\ncheckJava() {\n\tif [ -x \"\$JAVA_HOME/bin/java\" ]; then\n\t\tJAVA=\"\$JAVA_HOME/bin/java\"\n\telse\n\t\tJAVA=`which java`\n\tfi\n\n\tif [ ! -x \"\$JAVA\" ]; then\n\t\techo \"Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME\"\n\t\texit 1\n\tfi\n}\n\ncase \"\$1\" in\n  start)\n\tcheckJava\n\n\tlog_daemon_msg \"Starting \$DESC\"\n\n\tpid=`pidofproc -p \$PID_FILE elasticsearch`\n\tif [ -n \"\$pid\" ] ; then\n\t\tlog_begin_msg \"Already running.\"\n\t\tlog_end_msg 0\n\t\texit 0\n\tfi\n\n\t# Prepare environment\n\tfor DIR in \"\$DATA_DIR\" \"\$LOG_DIR\" \"\$WORK_DIR\"; do\n\t\t[ ! -z \"\$DIR\" ] && mkdir -p \"\$DIR\" && chown \"\$ES_USER\":\"\$ES_GROUP\" \"\$DIR\"\n\tdone\n\tif [ -n \"\$PID_FILE\" ] && [ ! -e \"\$PID_FILE\" ]; then\n\t\ttouch \"\$PID_FILE\" && chown \"\$ES_USER\":\"\$ES_GROUP\" \"\$PID_FILE\"\n\tfi\n\n\tif [ -n \"\$MAX_OPEN_FILES\" ]; then\n\t\tulimit -n \$MAX_OPEN_FILES\n\tfi\n\n\tif [ -n \"\$MAX_LOCKED_MEMORY\" ]; then\n\t\tulimit -l \$MAX_LOCKED_MEMORY\n\tfi\n\n\tif [ -n \"\$MAX_MAP_COUNT\" -a -f /proc/sys/vm/max_map_count ]; then\n\t\tsysctl -q -w vm.max_map_count=\$MAX_MAP_COUNT\n\tfi\n\n\t# Start Daemon\n\tstart-stop-daemon -d \$ES_HOME --start --user \"\$ES_USER\" -c \"\$ES_USER\" --pidfile \"\$PID_FILE\" --exec \$DAEMON -- \$DAEMON_OPTS\n\treturn=\$?\n\tif [ \$return -eq 0 ]; then\n\t\ti=0\n\t\ttimeout=10\n\t\t# Wait for the process to be properly started before exiting\n\t\tuntil { kill -0 `cat \"\$PID_FILE\"`; } >/dev/null 2>&1\n\t\tdo\n\t\t\tsleep 1\n\t\t\ti=\$((\$i + 1))\n\t\t\tif [ \$i -gt \$timeout ]; then\n\t\t\t\tlog_end_msg 1\n\t\t\t\texit 1\n\t\t\tfi\n\t\tdone\n\tfi\n\tlog_end_msg \$return\n\texit \$return\n\t;;\n  stop)\n\tlog_daemon_msg \"Stopping \$DESC\"\n\n\tif [ -f \"\$PID_FILE\" ]; then\n\t\tstart-stop-daemon --stop --pidfile \"\$PID_FILE\" \\\n\t\t\t--user \"\$ES_USER\" \\\n\t\t\t--quiet \\\n\t\t\t--retry forever/TERM/20 > /dev/null\n\t\tif [ \$? -eq 1 ]; then\n\t\t\tlog_progress_msg \"\$DESC is not running but pid file exists, cleaning up\"\n\t\telif [ \$? -eq 3 ]; then\n\t\t\tPID=\"`cat \$PID_FILE`\"\n\t\t\tlog_failure_msg \"Failed to stop \$DESC (pid \$PID)\"\n\t\t\texit 1\n\t\tfi\n\t\trm -f \"\$PID_FILE\"\n\telse\n\t\tlog_progress_msg \"(not running)\"\n\tfi\n\tlog_end_msg 0\n\t;;\n  status)\n\tstatus_of_proc -p \$PID_FILE elasticsearch elasticsearch && exit 0 || exit \$?\n\t;;\n  restart|force-reload)\n\tif [ -f \"\$PID_FILE\" ]; then\n\t\t\$0 stop\n\tfi\n\t\$0 start\n\t;;\n  *)\n\tlog_success_msg \"Usage: \$0 {start|stop|restart|force-reload|status}\"\n\texit 1\n\t;;\nesac\n\nexit 0\n" failed: undefined method `scan' for :absent:Symbol
Notice: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/Elasticsearch::Service[es-01]/Elasticsearch::Service::Init[es-01]/File[/etc/init.d/elasticsearch-es-01]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/Elasticsearch::Service[es-01]/Elasticsearch::Service::Init[es-01]/File[/etc/init.d/elasticsearch-es-01]: Skipping because of failed dependencies
Notice: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/Elasticsearch::Service[es-01]/Elasticsearch::Service::Init[es-01]/Service[elasticsearch-instance-es-01]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/Elasticsearch::Service[es-01]/Elasticsearch::Service::Init[es-01]/Service[elasticsearch-instance-es-01]: Skipping because of failed dependencies
Notice: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/Elasticsearch::Service[es-01]/Elasticsearch::Service::Init[es-01]/File[/etc/default/elasticsearch-es-01]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/Elasticsearch::Service[es-01]/Elasticsearch::Service::Init[es-01]/File[/etc/default/elasticsearch-es-01]: Skipping because of failed dependencies
Notice: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01]: Skipping because of failed dependencies
Notice: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/.elasticsearch.keystore.initial_md5sum]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/.elasticsearch.keystore.initial_md5sum]: Skipping because of failed dependencies
Notice: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/elasticsearch.keystore]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/elasticsearch.keystore]: Skipping because of failed dependencies
Notice: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/elasticsearch.yml]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/elasticsearch.yml]: Skipping because of failed dependencies
Notice: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/elasticsearch.yml.dpkg-dist]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/elasticsearch.yml.dpkg-dist]: Skipping because of failed dependencies
Notice: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/jvm.options]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/jvm.options]: Skipping because of failed dependencies
Notice: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/log4j2.properties]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/log4j2.properties]: Skipping because of failed dependencies
Notice: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/logging.yml]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/logging.yml]: Skipping because of failed dependencies
Notice: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/role_mapping.yml]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/role_mapping.yml]: Skipping because of failed dependencies
Notice: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/roles.yml]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/roles.yml]: Skipping because of failed dependencies
Notice: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/scripts]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/scripts]: Skipping because of failed dependencies
Notice: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/users]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/users]: Skipping because of failed dependencies
Notice: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/users_roles]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Profile::Elastic/Elasticsearch::Instance[es-01]/File[/etc/elasticsearch/es-01/users_roles]: Skipping because of failed dependencies
Notice: /Stage[main]/Elasticsearch::Config/File[/usr/share/elasticsearch/plugins]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Elasticsearch::Config/File[/usr/share/elasticsearch/plugins]: Skipping because of failed dependencies
Notice: /Stage[main]/Elasticsearch::Config/File[/etc/elasticsearch/jvm.options]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Elasticsearch::Config/File[/etc/elasticsearch/jvm.options]: Skipping because of failed dependencies
Notice: /Stage[main]/Elasticsearch::Package/Package[elasticsearch]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Elasticsearch::Package/Package[elasticsearch]: Skipping because of failed dependencies
Notice: /Stage[main]/Elasticsearch::Package/Exec[remove_plugin_dir]: Dependency Elasticsearch_service_file[/etc/init.d/elasticsearch-es-01] has failures: true
Warning: /Stage[main]/Elasticsearch::Package/Exec[remove_plugin_dir]: Skipping because of failed dependencies
Notice: Applied catalog in 0.73 seconds
aursu commented 6 years ago

Issue inside point 2. caused bug in 3. by partial remove of deb package

code in 3. is working