puppet-cassandra icon indicating copy to clipboard operation
puppet-cassandra copied to clipboard

dsc12 on Debian Squeeze

Open tommymcglynn opened this issue 11 years ago • 8 comments

Hello,

Trying to use this module but provision hangs when trying to install dsc12. I wasn't able to manually install dsc12 with apt-get or yum either.

Linux version 2.6.32-5-amd64 (Debian 2.6.32-48)

tommymcglynn avatar Aug 22 '13 01:08 tommymcglynn

Thanks for your bug report.

Does the problem occur on a fresh install or on upgrading an existing DSC install?

I'm not aware of any (packaging) bug in DSC 1.2 on Debian Squeeze. Could you please try to run a manual installation of DSC 1.2 on a fresh Debian Squeeze system and check if there are any error messages?

joschi avatar Aug 22 '13 12:08 joschi

Thank you for the follow up. This happens on a fresh install. If I don't include the cassandra module and try to install dsc12 directly, I get the following output

(I ran apt-get update before this) vagrant@debian-squeeze:~$ sudo apt-get install dsc12 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package dsc12

Also, here is my simple manifest file https://gist.github.com/tommymcglynn/6a053ccd85e61384773e

Here is the vagrant log for where provisioning hangs:

Notice: /Stage[main]/Apt::Update/Exec[apt_update]: Triggered 'refresh' from 1 events Debug: /Stage[main]/Apt::Update/Exec[apt_update]: The container Class[Apt::Update] will propagate my refresh event Debug: Class[Apt::Update]: The container Stage[main] will propagate my refresh event Debug: Apt::Source[datastax]: The container Class[Cassandra::Repo::Debian] will propagate my refresh event Debug: Class[Cassandra::Repo::Debian]: The container Stage[main] will propagate my refresh event Debug: /Schedule[puppet]: Skipping device resources because running on a host Debug: Class[Main]: The container Stage[main] will propagate my refresh event Debug: Executing '/usr/bin/dpkg-query -W --showformat ${Status} ${Package} ${Version}\n dsc12' Debug: Executing '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install dsc12'

tommymcglynn avatar Aug 22 '13 17:08 tommymcglynn

I'm running into the same problem on fresh Ubuntu 12.04.2. Here's the trace from the install

err: /Stage[main]/Cassandra::Install/Package[dsc]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install dsc12' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 dsc12 : Depends: cassandra (= 1.2.9) but 2.0.0 is to be installed
E: Unable to correct problems, you have held broken packages.

timfallmk avatar Sep 13 '13 23:09 timfallmk

I've recently experienced the same issue. I suppose that's because cassandra has been updated to 2.0.0 but the dsc12 (which have a dependency on cassandra) didn't have been updated with cassandra 2.0.0 but still need 1.2.9.

I use this little workaround which fit my needs :

class { 'cassandra':
    package_name => "cassandra",
    version => "1.2.9"
    [...]
}

Regards,

Matt

edit : the problem could maybe be fixed by changing the apt policy of the package 1.2.9. I didn't try this...

msimonin avatar Sep 14 '13 07:09 msimonin

As a follow up to @msimonin workaround, you can specify the variables $cassandra_version, and $cassandra_package_name in your ENC (or however you're doing it) to the values he gave above.

timfallmk avatar Sep 16 '13 17:09 timfallmk

Another quick way of fixing this issue is to replace all "dsc12" occurrences with "dsc20" occurrences in the modules directory. This way you'll be able to install the latest (2+) Cassandra version.

So, after installing the puppet module go to the modules/cassandra directory and run this command:

find . -type f -print0 | xargs -0 sed -i 's/dsc12/dsc20/g'

IMO this may be the way to fix the bug too.

Cheers!

sachinkagarwal avatar Dec 23 '13 16:12 sachinkagarwal

Why not?

class { 'cassandra':
    package_name => "dsc20",
    [...]
}

stagrlee avatar Jan 09 '14 00:01 stagrlee

FYI. This is what I'm currently doing for cassandra 1.2. You need to install the dsc12 package or an apt-get upgrade will upgrade to version 2.x.

package { "dsc12":
    ensure => present,
    require => Package['cassandra'],
}
class { 'cassandra':
  cluster_name        => 'dit',
  seeds               => [ '10.0.0.12', '10.0.0.13', '10.0.0.14', ],
  package_name        => 'cassandra',
  version             => '1.2.15',
  # thread_stack_size => '256',
}

For Cassandra 2.0, I use the patch posted in issue #14 and on some JVM's I need to increase the thread_stack_size.

class { 'cassandra':
  cluster_name        => 'v2Cluster',
  seeds               => [ '10.0.0.17', '10.0.0.18', '10.0.0.21', ],
  package_name        => 'dsc20',
  thread_stack_size   => '256',
}

stagrlee avatar Jan 20 '14 22:01 stagrlee