Ensuring upgrade of RPM

976 views
Skip to first unread message

kenneho

unread,
Jun 20, 2008, 7:08:18 AM6/20/08
to Puppet Users
Hi.


I've been using this definition to install backup-3-1.i686.rpm:

package { backup:
ensure => installed,
provider => rpm,
source => "http://example.com/backup-3-1.i686.rpm"
}

Now I've upgraded to version 3.2. How can I make sure that the clients
upgrade to 3.2? Simply replacing the source with "http://example.com/
backup-3-2.i686.rpm" doesn't seem to work.

I figured the "ensure => installed" might be the problem, but as far
as I know provider RPM does not support versioning.

So how do I ensure that the client install version 3.2?


Regards,
Kenneth Holter

Duncan Hill

unread,
Jun 20, 2008, 7:24:24 AM6/20/08
to puppet...@googlegroups.com
2008/6/20 kenneho <kenne...@gmail.com>:

> package { backup:
> ensure => installed,
> provider => rpm,
> source => "http://example.com/backup-3-1.i686.rpm"
> }
>
> Now I've upgraded to version 3.2. How can I make sure that the clients
> upgrade to 3.2? Simply replacing the source with "http://example.com/
> backup-3-2.i686.rpm" doesn't seem to work.
>
> So how do I ensure that the client install version 3.2?

ensure => "3-2" or possibly ensure => "latest"

kenneho

unread,
Jun 20, 2008, 7:38:28 AM6/20/08
to Puppet Users

I tried "ensure => '3-2' " but got: "Provider must have features
'versionable' to set 'ensure' to '(?-mix:.)' ".

When running "ensure => latest" I get an error message saying that
"Failed to retrieve current state of resource: Coult not get latest
version". Might this be bacause I'm using the "source" attribute with
the "provider" set to RPM? I mean, had the package been installed from
the regular repository it might have been different.


On 20 Jun, 13:24, "Duncan Hill" <bajand...@googlemail.com> wrote:
> 2008/6/20 kenneho <kenneho....@gmail.com>:

Evan Hisey

unread,
Jun 20, 2008, 9:45:05 AM6/20/08
to puppet...@googlegroups.com

Why don't you use the Yum provider and a local repoif you need custom
pacakges. The RPM provider does not support versions. It does support
just calling latest though. That should allso make it a little easier
to run updates.

Evan

Luke Kanies

unread,
Jun 20, 2008, 10:23:58 AM6/20/08
to puppet...@googlegroups.com
On Jun 20, 2008, at 6:38 AM, kenneho wrote:

> I tried "ensure => '3-2' " but got: "Provider must have features
> 'versionable' to set 'ensure' to '(?-mix:.)' ".
>
> When running "ensure => latest" I get an error message saying that
> "Failed to retrieve current state of resource: Coult not get latest
> version". Might this be bacause I'm using the "source" attribute with
> the "provider" set to RPM? I mean, had the package been installed from
> the regular repository it might have been different.


'ensure => latest' is the right solution, and it should definitely
work that way.

If it's not, then that's a bug, but.... This has worked for a long
time, AFAIK. Maybe people just don't really use it, and that's why it
seems to work for everyone, but I'm kinda skeptical of that.

--
Sabbagh's Second Law:
The biggest problem with communication is the illusion that it
has occurred.
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com

Reply all
Reply to author
Forward
0 new messages