Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Multiple problems in Sentinel installation #21

Open
@quulah

Description

Installation of the Sentinel fails with the following errors. I have a pull request ready.

The sentinel.rb has a few errors:

No resource or method named `owner' for `RedisCookbook::Resource::RedisSentinel "redis-sentinel"
>>   redis_sentinel node['redis']['sentinel']['service_name'] do
[2017-05-30T12:45:16+00:00] DEBUG: Re-raising exception: NoMethodError - undefined method `[]' for nil:NilClass

Package installation fails atleast on Ubuntu 16.04, this affects the default recipe too.

       [2017-05-30T13:11:52+00:00] ERROR: redis_installation[redis] (blp-redis::default line 12) had an error: Mixlib::ShellOut::ShellCommandFailed: apt_package[redis-server] (/tmp/kitchen/cache/cookbooks/blp-redis/libraries/redis_installation_package.rb line 111) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
       ---- Begin output of ["apt-get", "-q", "-y", "-o", "Dpkg::Options::=--path-exclude=/etc/redis*", "install", "redis-server=2:3.0.6-1"] ----
       STDOUT: Reading package lists...
       Building dependency tree...
       Reading state information...
       The following NEW packages will be installed:
         redis-server
       0 upgraded, 1 newly installed, 0 to remove and 156 not upgraded.
       Need to get 0 B/343 kB of archives.
       After this operation, 918 kB of additional disk space will be used.
       Selecting previously unselected package redis-server.
(Reading database ... 47609 files and directories currently installed.)
       Preparing to unpack .../redis-server_2%3a3.0.6-1_amd64.deb ...
       Unpacking redis-server (2:3.0.6-1) ...
       Processing triggers for man-db (2.7.5-1) ...
       Processing triggers for systemd (229-4ubuntu7) ...
       Processing triggers for ureadahead (0.100.0-19) ...
       Setting up redis-server (2:3.0.6-1) ...
       dpkg-statoverride: warning: --update given but /etc/redis/redis.conf does not exist
       Job for redis-server.service failed because the control process exited with error code. See "systemctl status redis-server.service" and "journalctl -xe" for details.
       invoke-rc.d: initscript redis-server, action "start" failed.
       dpkg: error processing package redis-server (--configure):
        subprocess installed post-installation script returned error exit status 1
       Processing triggers for systemd (229-4ubuntu7) ...
       Processing triggers for ureadahead (0.100.0-19) ...
       Errors were encountered while processing:
        redis-server
       STDERR: E: Sub-process /usr/bin/dpkg returned an error code (1)
       ---- End output of ["apt-get", "-q", "-y", "-o", "Dpkg::Options::=--path-exclude=/etc/redis*", "install", "redis-server=2:3.0.6-1"] ----
       Ran ["apt-get", "-q", "-y", "-o", "Dpkg::Options::=--path-exclude=/etc/redis*", "install", "redis-server=2:3.0.6-1"] returned 100

Kitchen files have no version and the run_lists in the policies are a bit mixed.

[2017-05-30T13:21:04+00:00] ERROR: Cookbook 'blp-redis' version '3.0.0' depends on chef version ["~> 12.5"], but the running chef version is 13.1.31
       [2017-05-30T13:21:04+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

The redis_sentinel resource has a broken template version handling.

[2017-05-30T13:49:12+00:00] DEBUG: Re-raising exception: NoMethodError - redis_sentinel[redis-sentinel] (blp-redis::sentinel line 14) had an error: NoMethodError: undefined method `first' for nil:NilClass
/tmp/kitchen/cache/cookbooks/blp-redis/libraries/redis_sentinel.rb:66:in `default_config_source'

Sentinel service parameters don't have --sentinel and the permissions of the file stop the service from starting.

May 30 13:50:11 sentinel-ubuntu-1604 redis-server[5370]: >>> 'sentinel monitor mymaster 127.0.0.1 6379 2'
May 30 13:50:11 sentinel-ubuntu-1604 redis-server[5370]: sentinel directive while not in sentinel mode
6609:X 30 May 13:59:57.508 # Sentinel config file /etc/redis-sentinel.conf is not writable: Permission denied. Exiting...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions