Giter Site home page Giter Site logo

Comments (11)

martinb3 avatar martinb3 commented on July 22, 2024

Actually, I get an error if one is already installed now:

Recipe: rabbitmq::default
  * remote_file[/var/chef/cache/rabbitmq-server-3.1.5-1.noarch.rpm] action create_if_missing (up to date)
  * rpm_package[/var/chef/cache/rabbitmq-server-3.1.5-1.noarch.rpm] action install

    ================================================================================
    Error executing action `install` on resource 'rpm_package[/var/chef/cache/rabbitmq-server-3.1.5-1.noarch.rpm]'
    ================================================================================

    Chef::Exceptions::Exec
    ----------------------
    rpm  -U /var/chef/cache/rabbitmq-server-3.1.5-1.noarch.rpm returned 2, expected 0

    Resource Declaration:
    ---------------------
    # In /var/chef/cache/cookbooks/rabbitmq/recipes/default.rb

    104:     rpm_package "#{Chef::Config[:file_cache_path]}/rabbitmq-server-#{node['rabbitmq']['version']}-1.noarch.rpm"
    105:   end

    Compiled Resource:
    ------------------
    # Declared in /var/chef/cache/cookbooks/rabbitmq/recipes/default.rb:104:in `from_file'

    rpm_package("/var/chef/cache/rabbitmq-server-3.1.5-1.noarch.rpm") do
      provider Chef::Provider::Package::Rpm
      action :install
      retries 0
      retry_delay 2
      guard_interpreter :default
      package_name "/var/chef/cache/rabbitmq-server-3.1.5-1.noarch.rpm"
      source "/var/chef/cache/rabbitmq-server-3.1.5-1.noarch.rpm"
      version "3.1.5-1"
      timeout 900
      cookbook_name "rabbitmq"
      recipe_name "default"
    end

from chef-cookbook.

jayashree-nataraj avatar jayashree-nataraj commented on July 22, 2024

i am trying to update from version 3.3.1 to 3.4.1, the chef run completes. logs shows that i installed 3.4.1 version, but the version still remains 3.3.1 when you check the service status.
I tried to restart manually, and it shows the new version. only works 1/3 times. i have mostly end up having database upgrade issues otherwise.

from chef-cookbook.

jjasghar avatar jjasghar commented on July 22, 2024

@JayashreeN that sounds like we're missing a :notifies or something after the update is happened. Are you installing it from the package? If so which and what distro?

from chef-cookbook.

jayashree-nataraj avatar jayashree-nataraj commented on July 22, 2024

i have use_distro_version set to false, and use rpm_package. I am trying to do an inplace upgrade from 3.3.1 to 3.4.1.
So on an existing cluster with 3.3.1, i am trying to upgrade it to higher version. to do this, i updated the attribute version.

reparing to replace rabbitmq-server 3.3.1-1 (using .../rabbitmq-server_3.4.1-1_all.deb) ...
Unpacking replacement rabbitmq-server ...
Setting up rabbitmq-server (3.4.1-1) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
[2014-12-02T17:05:32+00:00] DEBUG: STDERR:
[2014-12-02T17:05:32+00:00] DEBUG: ---- End output of dpkg -i /var/chef/cache/rabbitmq-server_3.4.1-1_all.deb ----
[2014-12-02T17:05:32+00:00] DEBUG: Ran dpkg -i /var/chef/cache/rabbitmq-server_3.4.1-1_all.deb returned 0
[2014-12-02T17:05:32+00:00] INFO: Processing service[rabbitmq-server] action stop (rabbitmq::default line 50)
[2014-12-02T17:05:32+00:00] DEBUG: Skipping service[rabbitmq-server] due to only_if ruby block
[2014-12-02T17:05:32+00:00] INFO: Processing execute[remove rabbitmq init.d command] action run (rabbitmq::default line 55)
[2014-12-02T17:05:32+00:00] DEBUG: Platform ubuntu version 12.04 found
[2014-12-02T17:05:32+00:00] INFO: execute[remove rabbitmq init.d command] ran successfully
[2014-12-02T17:05:32+00:00] INFO: Processing file[/etc/init.d/rabbitmq-server] action delete (rabbitmq::default line 59)
[2014-12-02T17:05:32+00:00] INFO: Processing template[/etc/init/rabbitmq-server.conf] action create (rabbitmq::default line 63)
[2014-12-02T17:05:32+00:00] DEBUG: template[/etc/init/rabbitmq-server.conf] checksumming file at /etc/init/rabbitmq-server.conf.

from chef-cookbook.

jjasghar avatar jjasghar commented on July 22, 2024

rpm_package? and it's calling dpkg -i /var/chef/cache/rabbitmq-server_3.4.1-1_all.deb ? I'll need to see if the rpm_package attriube controls the debian packages. If so, we need to change that name, that's confusing.

from chef-cookbook.

jayashree-nataraj avatar jayashree-nataraj commented on July 22, 2024

yes and yes. Thank you!!

from chef-cookbook.

jjasghar avatar jjasghar commented on July 22, 2024

@JayashreeN i cant seems to find where you set to use rpm_package can you link me the attribute.rb line that its set in?

from chef-cookbook.

jjasghar avatar jjasghar commented on July 22, 2024

Are you specifically talking about this? https://github.com/jjasghar/rabbitmq/blob/master/recipes/default.rb#L35-L45

from chef-cookbook.

jayashree-nataraj avatar jayashree-nataraj commented on July 22, 2024

yes,
https://github.com/jjasghar/rabbitmq/blob/master/recipes/default.rb#L35-L45
that
is it.

https://github.com/jjasghar/rabbitmq/blob/master/attributes/default.rb#L2-L4
in the attribute.rb

On Wed, Dec 3, 2014 at 1:24 PM, JJ Asghar [email protected] wrote:

Are you specifically talking about this?
https://github.com/jjasghar/rabbitmq/blob/master/recipes/default.rb#L35-L45


Reply to this email directly or view it on GitHub
#143 (comment).

from chef-cookbook.

jjasghar avatar jjasghar commented on July 22, 2024

Ok, so i think i get where you're coming from now.

We need to add a notifies to the upgrade/install package recipe to force it every time. Would you like to put a PR and test in for this?

The rpm_package resource is only called on rpm based distros, your deb based distro should be using the correct resource provider, if not the default package resource.

from chef-cookbook.

jjasghar avatar jjasghar commented on July 22, 2024

I created #180 to resolve this, if you have other thoughts please put them there.

from chef-cookbook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.