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

adding osd and monitors on the same host fails #51

Open
dgautam opened this issue Jun 7, 2014 · 1 comment
Open

adding osd and monitors on the same host fails #51

dgautam opened this issue Jun 7, 2014 · 1 comment

Comments

@dgautam
Copy link

dgautam commented Jun 7, 2014

On adding the following manifest file, it fails for Key['admin'].

node 'ubuntu-vanilla' {

        class { 'apt': update_timeout => '5000' }
        class { 'ceph::apt::ceph' : release => 'dumpling' }

          if !empty($::ceph_admin_key) {
            @@ceph::key { 'admin':
              secret       => $::ceph_admin_key,
              keyring_path => '/etc/ceph/keyring',
            }
          }
        class { 'role_ceph_mon': id => 'ubuntu-vanilla' }
  ceph::osd::device { '/dev/sdb':  journalsize => '200' }
  ceph::osd::device { '/dev/sdc': journalsize => '200'}
  ceph::osd::device { '/dev/sdd': journalsize => '200'}
}

I got following message
message: "Could not retrieve catalog from remote server: Error 400 on SERVER: Another local or imported resource exists with the type and title Ceph::Key[admin] on node ubuntu-vanilla"

After this I made following changes, at-least it allowed adding OSDs.

diff -r ./osd/device.pp /home/dgautam/puppet-ceph/manifests/osd/device.pp
55d54
<   #if $blkid != 'undefined'  and defined( Ceph::Key['admin'] ){
59c58
<       #require => Ceph::Key['admin'],

---
>       require => Ceph::Key['admin'],
diff -r ./osd.pp /home/dgautam/puppet-ceph/manifests/osd.pp
30c30
<   #Package['ceph'] -> Ceph::Key <<| title == 'admin' |>>

---
>   Package['ceph'] -> Ceph::Key <<| title == 'admin' |>>
[root@puppet manifests]$

Being new to puppet/ceph, I am not sure on the correct solution.

@kenny-opennix
Copy link

For osd

node 'ubuntu-vanilla' {

        class { 'apt': update_timeout => '5000' }
        class { 'ceph::apt::ceph' : release => 'dumpling' }

          if !empty($::ceph_admin_key) {
            @@ceph::key { 'admin':
              secret       => $::ceph_admin_key,
              keyring_path => '/etc/ceph/keyring',
            }
          }
class { 'role_ceph':
    fsid      => $::fsid,
    auth_type => 'cephx',
  }

  class { 'ceph::osd' :
    public_address  => $ipaddress_eth1,
    cluster_address => $ipaddress_eth2,
  }
  ceph::osd::device { '/dev/sdb':  journalsize => '200' }
   ceph::osd::device { '/dev/sdc': journalsize => '200'}
   ceph::osd::device { '/dev/sdd': journalsize => '200'} 
}

for mon something like this

node 'mon.test.ex' {
  if !empty($::ceph_admin_key) {
    @@ceph::key { 'admin':
      secret       => $::ceph_admin_key,
      keyring_path => '/etc/ceph/keyring',
    }
  }
  class { 'role_ceph_mon': id => 0 }
}

For fist mon id=0, for second id=1 etc

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