Salt: pecl.install failing when alreadly installed

Created on 17 Jul 2013  Â·  9Comments  Â·  Source: saltstack/salt

It's failing when "mongo" pecl is alreadly installed. But for some reason it's not failing with gearman pecl, just mongo.

I tried with only one, than other, than changing install order...
For now, i have no clue what's going on.

Bug

Most helpful comment

To install mongo pecl version 1.3.1:

$ pecl install mongo-1.3.1

If alreadly installed, or you want to install an older version:

$ pecl install -f mongo-1.3.1

All 9 comments

Can you give us some additional information please?

Specifically the version information, and the relevant pieces of the minion's debug log. Thanks!

In Fedora 19

First, i'm getting wrong version installed

$ salt --versions-report
           Salt: 0.15.3
         Python: 2.7.5 (default, Jul  8 2013, 09:48:59)
         Jinja2: 2.6
       M2Crypto: 0.21.1
 msgpack-python: 0.1.13
   msgpack-pure: Not Installed
       pycrypto: 2.6
         PyYAML: 3.10
          PyZMQ: 13.0.0
            ZMQ: 3.2.3

I have no pecl installed, so i highstate with this state:

mongo:
  pecl.installed:
   - version: 1.3.1

gearman:
  pecl.installed:
    - version: 1.1.1

And i get

$ sudo salt-call state.highstate
[INFO    ] Configuration file path: /etc/salt/minion
[INFO    ] Executing command 'ps -efH' in directory '/root'
[INFO    ] Loading fresh modules for state activity
[INFO    ] Fetching file 'salt://top.sls'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/modules'
[INFO    ] Syncing modules for environment 'base'
[INFO    ] Loading cache from salt://_modules, for base)
[INFO    ] Caching directory '_modules/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/states'
[INFO    ] Syncing states for environment 'base'
[INFO    ] Loading cache from salt://_states, for base)
[INFO    ] Caching directory '_states/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/grains'
[INFO    ] Syncing grains for environment 'base'
[INFO    ] Loading cache from salt://_grains, for base)
[INFO    ] Caching directory '_grains/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/renderers'
[INFO    ] Syncing renderers for environment 'base'
[INFO    ] Loading cache from salt://_renderers, for base)
[INFO    ] Caching directory '_renderers/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/returners'
[INFO    ] Syncing returners for environment 'base'
[INFO    ] Loading cache from salt://_returners, for base)
[INFO    ] Caching directory '_returners/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/outputters'
[INFO    ] Syncing outputters for environment 'base'
[INFO    ] Loading cache from salt://_outputters, for base)
[INFO    ] Caching directory '_outputters/' for environment 'base'
[INFO    ] Loading fresh modules for state activity
[INFO    ] Fetching file 'salt://test.sls'
[INFO    ] Executing state pecl.installed for gearman
[INFO    ] Executing command 'pecl list' in directory '/root'
[INFO    ] Executing command 'pecl install gearman' in directory '/root'
[INFO    ] {'gearman': 'Installed'}
[INFO    ] Executing state pecl.installed for mongo
[INFO    ] Executing command 'pecl list' in directory '/root'
[INFO    ] Executing command 'pecl install mongo' in directory '/root'
[INFO    ] {'mongo': 'Installed'}
local:
----------
    State: - pecl
    Name:      gearman
    Function:  installed
        Result:    True
        Comment:   Pecl was successfully installed
        Changes:   gearman: Installed

----------
    State: - pecl
    Name:      mongo
    Function:  installed
        Result:    True
        Comment:   Pecl was successfully installed
        Changes:   mongo: Installed

But my pecl list seems like:

$ pecl list
Installed packages, channel pecl.php.net:
=========================================
Package Version State
gearman 1.1.1   stable
mongo   1.4.1   stable

And if i triy highstate again i will get:

$ sudo salt-call state.highstate
[INFO    ] Configuration file path: /etc/salt/minion
[INFO    ] Executing command 'ps -efH' in directory '/root'
[INFO    ] Loading fresh modules for state activity
[INFO    ] Fetching file 'salt://top.sls'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/modules'
[INFO    ] Syncing modules for environment 'base'
[INFO    ] Loading cache from salt://_modules, for base)
[INFO    ] Caching directory '_modules/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/states'
[INFO    ] Syncing states for environment 'base'
[INFO    ] Loading cache from salt://_states, for base)
[INFO    ] Caching directory '_states/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/grains'
[INFO    ] Syncing grains for environment 'base'
[INFO    ] Loading cache from salt://_grains, for base)
[INFO    ] Caching directory '_grains/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/renderers'
[INFO    ] Syncing renderers for environment 'base'
[INFO    ] Loading cache from salt://_renderers, for base)
[INFO    ] Caching directory '_renderers/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/returners'
[INFO    ] Syncing returners for environment 'base'
[INFO    ] Loading cache from salt://_returners, for base)
[INFO    ] Caching directory '_returners/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/outputters'
[INFO    ] Syncing outputters for environment 'base'
[INFO    ] Loading cache from salt://_outputters, for base)
[INFO    ] Caching directory '_outputters/' for environment 'base'
[INFO    ] Loading fresh modules for state activity
[INFO    ] Fetching file 'salt://test.sls'
[INFO    ] Executing state pecl.installed for gearman
[INFO    ] Executing command 'pecl list' in directory '/root'
[INFO    ] No changes made for gearman
[INFO    ] Executing state pecl.installed for mongo
[INFO    ] Executing command 'pecl list' in directory '/root'
[INFO    ] Executing command 'pecl install mongo-1.3.1' in directory '/root'
[ERROR   ] Command 'pecl install mongo-1.3.1' failed with return code: 1
[ERROR   ] stdout: pecl/mongo is already installed and is newer than detected released version 1.3.1
install failed
[ERROR   ] No changes made for mongo
local:
----------
    State: - pecl
    Name:      mongo
    Function:  installed
        Result:    False
        Comment:   Could not install pecl.
        Changes:

So, i installed the right version manually and tried highstate again:

$ sudo salt-call state.highstate
[INFO    ] Configuration file path: /etc/salt/minion
[INFO    ] Executing command 'ps -efH' in directory '/root'
[INFO    ] Loading fresh modules for state activity
[INFO    ] Fetching file 'salt://top.sls'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/modules'
[INFO    ] Syncing modules for environment 'base'
[INFO    ] Loading cache from salt://_modules, for base)
[INFO    ] Caching directory '_modules/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/states'
[INFO    ] Syncing states for environment 'base'
[INFO    ] Loading cache from salt://_states, for base)
[INFO    ] Caching directory '_states/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/grains'
[INFO    ] Syncing grains for environment 'base'
[INFO    ] Loading cache from salt://_grains, for base)
[INFO    ] Caching directory '_grains/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/renderers'
[INFO    ] Syncing renderers for environment 'base'
[INFO    ] Loading cache from salt://_renderers, for base)
[INFO    ] Caching directory '_renderers/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/returners'
[INFO    ] Syncing returners for environment 'base'
[INFO    ] Loading cache from salt://_returners, for base)
[INFO    ] Caching directory '_returners/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/outputters'
[INFO    ] Syncing outputters for environment 'base'
[INFO    ] Loading cache from salt://_outputters, for base)
[INFO    ] Caching directory '_outputters/' for environment 'base'
[INFO    ] Loading fresh modules for state activity
[INFO    ] Fetching file 'salt://test.sls'
[INFO    ] Executing state pecl.installed for gearman
[INFO    ] Executing command 'pecl list' in directory '/root'
[INFO    ] No changes made for gearman
[INFO    ] Executing state pecl.installed for mongo
[INFO    ] Executing command 'pecl list' in directory '/root'
[INFO    ] No changes made for mongo
local:

It worked!

In Ubuntu 12.04

$ salt --versions-report
           Salt: 0.15.3
         Python: 2.7.3 (default, Aug  1 2012, 05:14:39)
         Jinja2: 2.6
       M2Crypto: 0.21.1
 msgpack-python: 0.1.10
   msgpack-pure: Not Installed
       pycrypto: 2.4.1
         PyYAML: 3.10
          PyZMQ: 13.0.0
            ZMQ: 3.2.2

With no pecls installed, I tried the same state and got:

$ sudo salt-call state.highstate
[INFO    ] Configuration file path: /etc/salt/minion
[INFO    ] Package debconf-utils is not installed.
[INFO    ] Executing command 'ps -efH' in directory '/home/ubuntu'
[INFO    ] Loading fresh modules for state activity
[INFO    ] Package debconf-utils is not installed.
[INFO    ] Package debconf-utils is not installed.
[INFO    ] Fetching file 'salt://top.sls'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/modules'
[INFO    ] Syncing modules for environment 'base'
[INFO    ] Loading cache from salt://_modules, for base)
[INFO    ] Caching directory '_modules/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/states'
[INFO    ] Syncing states for environment 'base'
[INFO    ] Loading cache from salt://_states, for base)
[INFO    ] Caching directory '_states/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/grains'
[INFO    ] Syncing grains for environment 'base'
[INFO    ] Loading cache from salt://_grains, for base)
[INFO    ] Caching directory '_grains/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/renderers'
[INFO    ] Syncing renderers for environment 'base'
[INFO    ] Loading cache from salt://_renderers, for base)
[INFO    ] Caching directory '_renderers/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/returners'
[INFO    ] Syncing returners for environment 'base'
[INFO    ] Loading cache from salt://_returners, for base)
[INFO    ] Caching directory '_returners/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/outputters'
[INFO    ] Syncing outputters for environment 'base'
[INFO    ] Loading cache from salt://_outputters, for base)
[INFO    ] Caching directory '_outputters/' for environment 'base'
[INFO    ] Loading fresh modules for state activity
[INFO    ] Package debconf-utils is not installed.
[INFO    ] Fetching file 'salt://test.sls'
[INFO    ] Executing state pecl.installed for gearman
[INFO    ] Executing command 'pecl list' in directory '/home/ubuntu'
[INFO    ] Executing command 'pecl install gearman' in directory '/home/ubuntu'
[INFO    ] {'gearman': 'Installed'}
[INFO    ] Executing state pecl.installed for mongo
[INFO    ] Executing command 'pecl list' in directory '/home/ubuntu'
[INFO    ] Executing command 'pecl install mongo' in directory '/home/ubuntu'
[INFO    ] {'mongo': 'Installed'}
local:
----------
    State: - pecl
    Name:      gearman
    Function:  installed
        Result:    True
        Comment:   Pecl was successfully installed
        Changes:   gearman: Installed

----------
    State: - pecl
    Name:      mongo
    Function:  installed
        Result:    True
        Comment:   Pecl was successfully installed
        Changes:   mongo: Installed

And my pecl list:

$ pecl list
Installed packages, channel pecl.php.net:
=========================================
Package Version State
gearman 1.1.1   stable
mongo   1.4.1   stable

Wrong version too. So i called highstate again and got:

$ time sudo salt-call state.highstate
[INFO    ] Configuration file path: /etc/salt/minion
[INFO    ] Package debconf-utils is not installed.
[INFO    ] Executing command 'ps -efH' in directory '/home/ubuntu'
[INFO    ] Loading fresh modules for state activity
[INFO    ] Package debconf-utils is not installed.
[INFO    ] Package debconf-utils is not installed.
[INFO    ] Fetching file 'salt://top.sls'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/modules'
[INFO    ] Syncing modules for environment 'base'
[INFO    ] Loading cache from salt://_modules, for base)
[INFO    ] Caching directory '_modules/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/states'
[INFO    ] Syncing states for environment 'base'
[INFO    ] Loading cache from salt://_states, for base)
[INFO    ] Caching directory '_states/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/grains'
[INFO    ] Syncing grains for environment 'base'
[INFO    ] Loading cache from salt://_grains, for base)
[INFO    ] Caching directory '_grains/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/renderers'
[INFO    ] Syncing renderers for environment 'base'
[INFO    ] Loading cache from salt://_renderers, for base)
[INFO    ] Caching directory '_renderers/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/returners'
[INFO    ] Syncing returners for environment 'base'
[INFO    ] Loading cache from salt://_returners, for base)
[INFO    ] Caching directory '_returners/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/outputters'
[INFO    ] Syncing outputters for environment 'base'
[INFO    ] Loading cache from salt://_outputters, for base)
[INFO    ] Caching directory '_outputters/' for environment 'base'
[INFO    ] Loading fresh modules for state activity
[INFO    ] Package debconf-utils is not installed.
[INFO    ] Fetching file 'salt://test.sls'
[INFO    ] Executing state pecl.installed for gearman
[INFO    ] Executing command 'pecl list' in directory '/home/ubuntu'
[INFO    ] No changes made for gearman
[INFO    ] Executing state pecl.installed for mongo
[INFO    ] Executing command 'pecl list' in directory '/home/ubuntu'
[INFO    ] Executing command 'pecl install mongo-1.3.1' in directory '/home/ubuntu'
[ERROR   ] Command 'pecl install mongo-1.3.1' failed with return code: 1
[ERROR   ] stdout: pecl/mongo is already installed and is newer than detected released version 1.3.1
install failed
[ERROR   ] No changes made for mongo
local:
----------
    State: - pecl
    Name:      mongo
    Function:  installed
        Result:    False
        Comment:   Could not install pecl.
        Changes:

So i manually installed the right version and called highstate again:

$ sudo salt-call state.highstate
[INFO    ] Configuration file path: /etc/salt/minion
[INFO    ] Package debconf-utils is not installed.
[INFO    ] Executing command 'ps -efH' in directory '/home/ubuntu'
[INFO    ] Loading fresh modules for state activity
[INFO    ] Package debconf-utils is not installed.
[INFO    ] Package debconf-utils is not installed.
[INFO    ] Fetching file 'salt://top.sls'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/modules'
[INFO    ] Syncing modules for environment 'base'
[INFO    ] Loading cache from salt://_modules, for base)
[INFO    ] Caching directory '_modules/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/states'
[INFO    ] Syncing states for environment 'base'
[INFO    ] Loading cache from salt://_states, for base)
[INFO    ] Caching directory '_states/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/grains'
[INFO    ] Syncing grains for environment 'base'
[INFO    ] Loading cache from salt://_grains, for base)
[INFO    ] Caching directory '_grains/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/renderers'
[INFO    ] Syncing renderers for environment 'base'
[INFO    ] Loading cache from salt://_renderers, for base)
[INFO    ] Caching directory '_renderers/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/returners'
[INFO    ] Syncing returners for environment 'base'
[INFO    ] Loading cache from salt://_returners, for base)
[INFO    ] Caching directory '_returners/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/outputters'
[INFO    ] Syncing outputters for environment 'base'
[INFO    ] Loading cache from salt://_outputters, for base)
[INFO    ] Caching directory '_outputters/' for environment 'base'
[INFO    ] Loading fresh modules for state activity
[INFO    ] Package debconf-utils is not installed.
[INFO    ] Fetching file 'salt://test.sls'
[INFO    ] Executing state pecl.installed for gearman
[INFO    ] Executing command 'pecl list' in directory '/home/ubuntu'
[INFO    ] No changes made for gearman
[INFO    ] Executing state pecl.installed for mongo
[INFO    ] Executing command 'pecl list' in directory '/home/ubuntu'
[INFO    ] No changes made for mongo
local:

Worked!

Finaly

So, in both Fedora 19 and Ubuntu 12.04, it's failing to install the right version of the pecl, and it's failing to install the mentioned version when other version is alreadly installed. But it's working fine when the right version is alreadly installed.

When you say you manually installed the correct version, do you mean you used PECL to install that correct version?

Yes, with -f option, to force the "right" version

On Thu, Jul 18, 2013 at 3:11 PM, Colton Myers [email protected]:

When you say you manually installed the correct version, do you mean you
used PECL to install that correct version?

—
Reply to this email directly or view it on GitHubhttps://github.com/saltstack/salt/issues/6214#issuecomment-21203113
.

Hrm, interesting. My first thought would have been that it couldn't find the specified version and so fell back to a previous version. But if you can install the correct version using PECL, I guess that must be an incorrect assumption.

We'll look into it.

I'm not familiar enough with PECL to know exactly what's going on. Can you give me the commands you would use to install mongo with PECL at the prescribed version? Both from-scratch and with -f to override.

Thanks!

To install mongo pecl version 1.3.1:

$ pecl install mongo-1.3.1

If alreadly installed, or you want to install an older version:

$ pecl install -f mongo-1.3.1

Cool, thanks, I'll look into this.

Fixed in #6315. Add force: True to your state once that fix is in.

Was this page helpful?
0 / 5 - 0 ratings