Commit e1f084 introduced a regression when the bootstrap OSD secret is
stored in encrypted databags (EDB). The problem is that if the first
monitor is started without the bootstrap OSD key in the keyring, a
random OSD secret is generated, which will then not match the
pre-generated one.
The solution is to revert the resource that adds the bootstrap OSD key
to where it was (before monitor starts) but add a condition that ensures
this is only done if EDBs are enabled. When EDBs are not enabled, it is
not necessary to add the bootstrap OSD key to the keyring.
mick.mccarthy [Wed, 5 Aug 2015 14:38:57 +0000 (15:38 +0100)]
Fix timing issue with ceph pool create
There are scenarios being encountered where ceph::mon attempts to create
pools before all the required ceph services are up and running. This
causes the recipe to fail.
My proposed solution to this issue is to remove the 'ceph pool create'
block from the ceph::mon recipe and place it in it's own separate recipe
(ceph::pools), which is placed below ceph::mon in the runlist for the role
(ceph-mon.json).
Having this code in a separate recipe allows better control of when the
pools are created.
Add bootstrap-osd key after it's been created if databags are not used
This change fixes a regression introduced 807f08 that caused
the cookbook to fail if data_bags were not used. The bootstrap-osd
key would not be created at the time of the key being added to the
keyring, causing the chef run to fail. We now try to add the key after
we've checked if the key needs to be created, which will only happen
if we're not using data_bags
When encrypted_data_bags is enabled, it is necessary to inject the OSD
secret into the monitor keyring used to create the cluster. If that
isn't done, by the time the OSD recipe tries to use the OSD secret as
client.bootstrap-osd, Ceph will have generated a random key (and it
won't match the key from the encrypted data bag).
Extend the client LWRP to allow a Ceph auth entity to be created with
a given key, instead of letting ceph auth generate a random one. This
is useful when the keys are managed elsewhere and are known beforehand.
Also, change the way an entity is recreated in case of a caps mismatch.
Instead of relying on parsing an error message from auth get-or-create,
explicitly check if entity exists and matches specification.
This change introduces a pool LWRP that allows Ceph user pools to be
created and/or deleted by simply specifying their name and number of
placement groups.
It also allows users to define their own pools in Chef attributes or
environments that are then created automatically when nodes are
provisioned.
Get OSD bootstrap key on the current node if possible
When deploying monitor and OSD daemons on the same node, it is
possible to retrieve the OSD bootstrap key from the node itself
(if the monitor recipe has already been applied), instead of
relying on a search in Chef for existing monitors.
This change also serves as a workaround when monitor and OSD
daemons are being installed on the first node of the cluster and,
for some reason, chef-client doesn't converge at the first attempt.
Without this change, running chef-client a second time, the node
might not be found with the Chef search.
Jeff Goldschrafe [Sat, 14 Mar 2015 04:36:46 +0000 (00:36 -0400)]
Update supported codenames in radosgw_apache2_repo
Update `ceph::radosgw_apache2_repo` to add repositories for Ubuntu Saucy and Trusty. (Utopic and the upcoming Vivid have no official repositories yet.)
Walter Huf [Mon, 22 Sep 2014 19:46:12 +0000 (14:46 -0500)]
Stops automatically restarting apache2 every run
I don't know why this is in here, but it's disruptive. Perhaps there was a first-run issue
that needed the restart, so I set up the first-time notifications to restart Apache
Walter Huf [Wed, 30 Jul 2014 16:44:58 +0000 (11:44 -0500)]
Apt-pins the Ceph version to the Ceph repo version
Ubuntu 14.04 ships a newer version than this cookbook defaults to.
This pin allows for easy installation of the same Ceph version across multiple Ubuntu versions
Walter Huf [Thu, 10 Jul 2014 15:38:29 +0000 (10:38 -0500)]
Fixes mon_addresses when using linux-ha ip aliases
linux-ha has an IPaddr and IPaddr2 resource to create HA IP aliases
However, it assigns a broadcast address to this IP
This changes changes mon_addresses to ignore IP addresses that have a different
netmask along with the previous check for the existance of broadcast
Walter Huf [Tue, 8 Jul 2014 20:16:44 +0000 (15:16 -0500)]
Allows nodes to specify a ceph environment to search
If a server is in a different environment than the ceph mons, but
it still wants to connect to the ceph cluster, it can specify a
node['ceph']['search_environment'] attribute that matches the
ceph mons' node.chef_environment attribute.
This will enable the server to find the ceph mon nodes, register
for cephx keyrings, and create a working ceph.conf file