Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 18.04 issue just installing #475

Closed
cmseal opened this issue Sep 13, 2018 · 8 comments
Closed

Ubuntu 18.04 issue just installing #475

cmseal opened this issue Sep 13, 2018 · 8 comments

Comments

@cmseal
Copy link

cmseal commented Sep 13, 2018

Puppet agent 5.5.6
Just want to install PHP...

Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install python-software-properties' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
Package python-software-properties is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
software-properties-common

@bastelfreak
Copy link
Member

bastelfreak commented Sep 13, 2018

Hi @cmseal. Can you please provide a few more information? How did you call this module? Which version do you use? Which version of the apt module?

We have a pretty basic acceptance test that works on Ubuntu18.04:

pp = 'include php'
# Run it twice and test for idempotency
apply_manifest(pp, catch_failures: true)
apply_manifest(pp, catch_changes: true)
end
case default[:platform]
when %r{ubuntu-18.04}
packagename = 'php7.2-fpm'

@cmseal
Copy link
Author

cmseal commented Sep 14, 2018

Hi @bastelfreak, sorry here's some more info... if any other info will help, let me know.

Clean 18.04.1 LTS server with apt 1.6.3ubuntu0.1 (amd64), and module is latest pulled from master, as a submodule on my puppet master. Called in manifest with "include ::php" with hiera config:

---
php::extensions:
    mysql: {}
    mbstring: {}
    mcrypt: {}
    gd: {}

Full error is:

Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install python-software-properties' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
Package python-software-properties is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  software-properties-common

E: Package 'python-software-properties' has no installation candidate
Error: /Stage[main]/Php::Repo::Ubuntu/Apt::Ppa[ppa:ondrej/php]/Package[python-software-properties]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install python-software-properties' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
Package python-software-properties is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  software-properties-common

E: Package 'python-software-properties' has no installation candidate
Notice: /Stage[main]/Php::Repo::Ubuntu/Apt::Ppa[ppa:ondrej/php]/Exec[add-apt-repository-ppa:ondrej/php]: Dependency Package[python-software-properties] has failures: true

@bastelfreak
Copy link
Member

Is that version 6.0.0 of this module? https://forge.puppet.com/puppetlabs/apt, if not: please update it and test it again. I will try to setup a test for this

@bastelfreak
Copy link
Member

for reference. Changed resources for a simple include php on Ubuntu 18.04:

  Info: Applying configuration version '1537003020'
  Notice: /Stage[main]/Php::Packages/Package[php7.2-cli]/ensure: created
  Notice: /Stage[main]/Php::Fpm/Package[php7.2-fpm]/ensure: created
  Info: Computing checksum on file /etc/php/7.2/fpm/php-fpm.conf
  Info: /Stage[main]/Php::Fpm::Config/File[/etc/php/7.2/fpm/php-fpm.conf]: Filebucketed /etc/php/7.2/fpm/php-fpm.conf to puppet with sum 1d85fd977fab4da8e3e139d6d53504d3
  Notice: /Stage[main]/Php::Fpm::Config/File[/etc/php/7.2/fpm/php-fpm.conf]/content: content changed '{md5}1d85fd977fab4da8e3e139d6d53504d3' to '{md5}0a7a6ed4484098ad06ba3a9c24c6bb09'
  Notice: /Stage[main]/Php::Fpm::Config/File[/var/run/php-fpm/]/ensure: created
  Notice: /Stage[main]/Php::Fpm::Config/File[/var/log/php-fpm/]/ensure: created
  Info: Class[Php::Fpm::Config]: Scheduling refresh of Class[Php::Fpm::Service]
  Notice: /Stage[main]/Php::Dev/Package[php7.2-xml]/ensure: created
  Notice: /Stage[main]/Php::Dev/Package[php7.2-dev]/ensure: created
  Notice: /Stage[main]/Php::Composer/Archive[download composer]/ensure: download archive from https://getcomposer.org/composer.phar to /usr/local/bin/composer  with cleanup
  Notice: /Stage[main]/Php::Composer/File[/usr/local/bin/composer]/mode: mode changed '0644' to '0555'
  Info: Computing checksum on file /etc/php/7.2/fpm/pool.d/www.conf
  Info: /Stage[main]/Php::Fpm/Php::Fpm::Pool[www]/File[/etc/php/7.2/fpm/pool.d/www.conf]: Filebucketed /etc/php/7.2/fpm/pool.d/www.conf to puppet with sum 52cec63f9f266ef995a94cdaf493ade5
  Notice: /Stage[main]/Php::Fpm/Php::Fpm::Pool[www]/File[/etc/php/7.2/fpm/pool.d/www.conf]/content: content changed '{md5}52cec63f9f266ef995a94cdaf493ade5' to '{md5}669d323b09a91db456298421046f923e'
  Info: /Stage[main]/Php::Fpm/Php::Fpm::Pool[www]/File[/etc/php/7.2/fpm/pool.d/www.conf]: Scheduling refresh of Class[Php::Fpm::Service]
  Info: Class[Php::Fpm::Service]: Scheduling refresh of Service[php7.2-fpm]
  Notice: /Stage[main]/Php::Fpm::Service/Service[php7.2-fpm]/ensure: ensure changed 'stopped' to 'running'
  Info: /Stage[main]/Php::Fpm::Service/Service[php7.2-fpm]: Unscheduling refresh on Service[php7.2-fpm]
  Info: Creating state file /opt/puppetlabs/puppet/cache/state/state.yaml
  Notice: Applied catalog in 26.74 seconds

@bastelfreak
Copy link
Member

bastelfreak commented Sep 15, 2018

mcrypt isn't a packaged module on Ubuntu 18.04 because it got deprecated for PHP 7.2. Puppet output:

  Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install php7.2-mcrypt' returned 100: Reading package lists...
  Building dependency tree...
  Reading state information...
  E: Unable to locate package php7.2-mcrypt
  E: Couldn't find any package by glob 'php7.2-mcrypt'
  E: Couldn't find any package by regex 'php7.2-mcrypt'
  Error: /Stage[main]/Php/Php::Extension[mcrypt]/Php::Extension::Install[mcrypt]/Package[php7.2-mcrypt]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install php7.2-mcrypt' returned 100: Reading package lists...
  Building dependency tree...
  Reading state information...
  E: Unable to locate package php7.2-mcrypt
  E: Couldn't find any package by glob 'php7.2-mcrypt'
  E: Couldn't find any package by regex 'php7.2-mcrypt'

@bastelfreak
Copy link
Member

bastelfreak commented Sep 15, 2018

I added some tests in #476. It seems that software-properties-common is pulled in via #419. It manages the needed package to add ppa:

https://github.com/puppetlabs/puppetlabs-apt/blob/484d13b8f166353cc1a18ad03e1aedee08e5753b/manifests/ppa.pp#L59-L65

On Ubuntu this is always software-properties-common:

https://github.com/puppetlabs/puppetlabs-apt/blob/484d13b8f166353cc1a18ad03e1aedee08e5753b/manifests/params.pp#L90-L98

@bastelfreak
Copy link
Member

I added a test that also installs extensions. Works fine on ubuntu: #476

@dhollinger
Copy link
Member

This issue was solved with #482

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants