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

Couchbase community install not correctly detected after first run #43

Open
abegosum opened this issue Apr 11, 2017 · 2 comments
Open

Comments

@abegosum
Copy link

In the latest commits, if you're using couchbase-community-server and the curl install method, the first run works as expected. Secondary runs, however, cause a failure because the yum-registered package name differs from what the package type now expects. Here's the output you'll receive:

Error: Execution of '/bin/rpm -i /opt/couchbase-server-community-3.1.3-centos6.x86_64.rpm' returned 1: package couchbase-server-3.1.3-1823.x86_64 is already installed Error: /Stage[main]/Couchbase::Install/Package[couchbase-server-community]/ensure: change from absent to present failed: Execution of '/bin/rpm -i /opt/couchbase-server-community-3.1.3-centos6.x86_64.rpm' returned 1: package couchbase-server-3.1.3-1823.x86_64 is already installed

Listing the package in yum demonstrates the discrepancy:

[root@hqintrubystageutil01 ~]# yum list couchbase*
Loaded plugins: fastestmirror, security, versionlock
Loading mirror speeds from cached hostfile
 * epel: reflector.westga.edu
Installed Packages
couchbase-server.x86_64                                                                                                 3.1.3-1823                                                                                                  installed

For reference,, this is our instantiation of the class in our profile code:


  if $password == 'default' {
    $couchbase_passwords = hiera('couchbase::passwords', {})
    $actual_password = $couchbase_passwords[$server_group]
  } else {
    $actual_password = $password
  }
  class { '::couchbase':
    size           => $size,
    user           => $user,
    password       => $actual_password,
    version        => $version,
    edition        => $edition,
    install_method => $install_method,
    server_group   => $server_group,
  }
  if ($include_default_bucket) {
    couchbase::bucket { 'default':
      port     => $default_bucket_port,
      size     => $size,
      user     => $user,
      password => $actual_password,
      type     => $default_bucket_type,
      replica  => $default_bucket_replica,
      flush    => $default_bucket_flush,
    }
  }

@abegosum
Copy link
Author

More information- at least in Cent 6, the yum package name (which puppet will key off of on the name variable of the package type is couchbase-server whether you have enterprise or community installed. Here's a test enterprise install and yum list to demonstrate.

[root@server ~]# rpm -i /tmp/couchbase-server-enterprise-4.6.1-centos6.x86_64.rpm
Warning: Transparent hugepages looks to be active and should not be.
Please look at http://bit.ly/1ZAcLjD as for how to PERMANENTLY alter this setting.
Warning: Transparent hugepages looks to be active and should not be.
Please look at http://bit.ly/1ZAcLjD as for how to PERMANENTLY alter this setting.
Warning: Swappiness is not set to 0.
Please look at http://bit.ly/1k2CtNn as for how to PERMANENTLY alter this setting.
Minimum RAM required  : 4 GB
System RAM configured : 3.74 GB

Minimum number of processors required : 4 cores
Number of processors on the system    : 4 cores

Starting couchbase-server
[  OK  ]

You have successfully installed Couchbase Server.
Please browse to http://server.company.org:8091/ to configure your server.
Please refer to http://couchbase.com for additional resources.

Please note that you have to update your firewall configuration to
allow connections to the following ports:
4369, 8091 to 8094, 9100 to 9105, 9998, 9999, 11209 to 11211,
11214, 11215, 18091 to 18093, and from 21100 to 21299.

By using this software you agree to the End User License Agreement.
See /opt/couchbase/LICENSE.txt.

[root@server ~]# yum list couchbase*
Loaded plugins: fastestmirror, security, versionlock
Loading mirror speeds from cached hostfile
 * epel: reflector.westga.edu
Installed Packages
couchbase-server.x86_64                                                                                                 4.6.1-3652                                                                                                  installed

@rdev5
Copy link
Contributor

rdev5 commented Jul 11, 2017

Please see related PR demonstrating fix (isolated to 4.6.2 when using curl): #44.

If you're using Puppet Enterprise (or librarian-puppet), you can test these changes by forking the module repository and updating your module declaration in Puppetfile to use your copy.

Example:

mod 'jlondon-couchbase',
:git => 'https://github.com/rdev5/puppet-couchbase.git',
:commit => '993be47'

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

2 participants