Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

issue in server_os_packages.rb #319

Open
uyo1787 opened this issue Jan 4, 2018 · 8 comments
Open

issue in server_os_packages.rb #319

uyo1787 opened this issue Jan 4, 2018 · 8 comments
Assignees
Labels

Comments

@uyo1787
Copy link

uyo1787 commented Jan 4, 2018

I'm using "icinga2::server" recipe at ubuntu 16.04 and get

Recipe: icinga2::server_os_packages
  * apt_package[icinga2_packages] action install

    ================================================================================
    Error executing action `install` on resource 'apt_package[icinga2_packages]'
    ================================================================================

    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Expected process to exit with [0], but received '100'
    ---- Begin output of apt-get -q -y install libgd2-xpm-dev libjpeg62=1:6b2-2 libpng12-dev=1.2.54-1ubuntu1 imagemagick=8:6.8.9.9-7ubuntu5.9 php7.0-imagick php-pear=1:1.10.5+submodules+notgz-1+ubuntu16.04.1+deb.sury.org+1 php7.0-xmlrpc=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 php7.0-xsl=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 php7.0-mysql=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 php-soap=1:7.1+55+ubuntu16.04.1+deb.sury.org+1 php7.0-gd=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 php7.0-ldap=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 php7.0-pgsql=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 php7.0-intl=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 ----
    STDOUT: Reading package lists...
    Building dependency tree...
    Reading state information...
    Package libgd2-xpm-dev is a virtual package provided by:
      libgd-dev 2.1.1-4ubuntu0.16.04.8 [Not candidate version]
      libgd-dev 2.1.1-4build2 [Not candidate version]
    STDERR: E: Package 'libgd2-xpm-dev' has no installation candidate
    ---- End output of apt-get -q -y install libgd2-xpm-dev libjpeg62=1:6b2-2 libpng12-dev=1.2.54-1ubuntu1 imagemagick=8:6.8.9.9-7ubuntu5.9 php7.0-imagick php-pear=1:1.10.5+submodules+notgz-1+ubuntu16.04.1+deb.sury.org+1 php7.0-xmlrpc=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 php7.0-xsl=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 php7.0-mysql=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 php-soap=1:7.1+55+ubuntu16.04.1+deb.sury.org+1 php7.0-gd=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 php7.0-ldap=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 php7.0-pgsql=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 php7.0-intl=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 ----
    Ran apt-get -q -y install libgd2-xpm-dev libjpeg62=1:6b2-2 libpng12-dev=1.2.54-1ubuntu1 imagemagick=8:6.8.9.9-7ubuntu5.9 php7.0-imagick php-pear=1:1.10.5+submodules+notgz-1+ubuntu16.04.1+deb.sury.org+1 php7.0-xmlrpc=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 php7.0-xsl=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 php7.0-mysql=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 php-soap=1:7.1+55+ubuntu16.04.1+deb.sury.org+1 php7.0-gd=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 php7.0-ldap=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 php7.0-pgsql=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 php7.0-intl=7.0.26-2+ubuntu16.04.1+deb.sury.org+2 returned 100

    Resource Declaration:
    ---------------------
    # In /var/chef/cache/cookbooks/icinga2/recipes/server_os_packages.rb

     61: package 'icinga2_packages' do
     62:   package_name os_packages
     63:   action :install
     64: end

    Compiled Resource:
    ------------------
    # Declared in /var/chef/cache/cookbooks/icinga2/recipes/server_os_packages.rb:61:in `from_file'

    apt_package("icinga2_packages") do
      package_name ["g++", "mailutils", "php7.0", "php7.0-cli", "php7.0-fpm", "build-essential", "libgd2-xpm-dev", "libjpeg62", "libpng12-0", "libpng12-dev", "libapache2-mod-php7.0", "imagemagick", "php7.0-imagick", "php-pear", "php7.0-xmlrpc", "php7.0-xsl", "php7.0-mysql", "php-soap", "php7.0-gd", "php7.0-ldap", "php7.0-pgsql", "php7.0-intl"]
      action [:install]
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      declared_type :package
      cookbook_name "icinga2"
      recipe_name "server_os_packages"
    end

    Platform:
    ---------
    x86_64-linux

"icinga2": "~> 3.0.1"

@vills
Copy link
Contributor

vills commented Jan 4, 2018

Something changed in 'ondrej' ppa. For 16.04 'libgd2-xpm-dev' should be replaced by 'libgd-dev' (comes from same ondrej ppa).

@uyo1787
Copy link
Author

uyo1787 commented Jan 4, 2018

@vills is it possible replace it in 3.0.2 release? Otherwise I need to update my version to 4.0.0 where I don't see any 'os_packages' for 16.04.

@vills
Copy link
Contributor

vills commented Jan 5, 2018

In 4.0.0 those 'os_packages' where moved to 'icingaweb2' cookbook.
About upgrade in 3.0.2 - @vkhatri ?

@uyo1787
Copy link
Author

uyo1787 commented Jan 5, 2018

@vills thanks for your response. I'm trying now latest v4.0.0. Looks like package installation completed.

@uyo1787
Copy link
Author

uyo1787 commented Jan 5, 2018

Finally installed it for 16.04. Some of my cookbooks recipes from v2.x.x are not working anymore. I mean this one for example:

default['mynode']['icinga2']['plugins']['packages'] = %w( nagios-plugins-mysql nagios-plugins-dns nagios-plugins-nrpe nagios-plugins-oracle nagios-plugins-http nagios-plugins-tcp nagios-plugins-smtp)
...
node['mynode']['icinga2']['plugins']['packages'].each do |plugin|
  package plugin
end

And since 'os_packages' where moved to 'icingaweb2' cookbook for me there is no option to enable web UI at 16.04.

Neither 3.0.1 no 4.0.0 is not working fro 16.04. Could someone give me a hint how to fix it?

@vkhatri
Copy link
Member

vkhatri commented Jan 5, 2018

Not sure about the plugins packages reference, plugins are not installed by the icinga2 cookbooks.

What do you mean by Neither 3.0.1 nor 4.0.0 is working for 16.04? Could you share the chef-client run error output and the expected behavior? So that I can take a look at it.

@uyo1787
Copy link
Author

uyo1787 commented Jan 5, 2018

the main issue for v3.0.1 is is present above:

Package libgd2-xpm-dev is a virtual package provided by:
      libgd-dev 2.1.1-4ubuntu0.16.04.8 [Not candidate version]
      libgd-dev 2.1.1-4build2 [Not candidate version]

and as mentioned by @vills it should be replaced by 'libgd-dev'.

for v4.0.0 the same issue comes after:

include_recipe 'icingaweb2::default'

For me now only v4.0.0 is working but without 'icingaweb2'

@vkhatri
Copy link
Member

vkhatri commented Jan 6, 2018

Thank you, will look into it.

@vkhatri vkhatri self-assigned this Jan 6, 2018
@vkhatri vkhatri added the bug label Jan 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants