Feature #2662
crowbar: Make barclamp-ceph set mon initial members, monitor-secret, fsid
0%
Description
Without this, multi-mon bring-up is racy.
At proposal save time, the barclamp should inspect the roles, and assign the nodenames to the attribute in the environment. How to do this is highly crowbar specific. Also, Crowbar doesn't use Chef environments the usual way; make sure this is the right thing to do.
monitor-secret and fsid need to be randomly generated (though monitor-secret needs to be in specific format, and that format is currently only known by tools inside ceph.deb, which won't be available at this time; work on this elsewhere)
History
#1 Updated by Anonymous over 11 years ago
- Subject changed from crowbar: Make barclamp-ceph set mon initial members to crowbar: Make barclamp-ceph set mon initial members, monitor-secret, fsid
- Description updated (diff)
#2 Updated by Anonymous over 11 years ago
- Category set to chef
#3 Updated by Anonymous over 11 years ago
This python snippet creates ceph keys in the right format (for now). Where it should live is still an open question.
#!/usr/bin/python import base64 import struct AES_128_KEY_TYPE = 1 AES_128_KEY_LEN = 16 def encode(created_nsec, entropy): NANO = 1000000000 secs, nsecs = divmod(created_nsec, NANO) assert len(entropy) == AES_128_KEY_LEN s = struct.pack( '<HLLH16s', AES_128_KEY_TYPE, secs, nsecs, AES_128_KEY_LEN, entropy, ) assert len(s) == 28 return base64.b64encode(s) if __name__ == '__main__': import random import time entropy = struct.pack( 'QQ', random.getrandbits(64), random.getrandbits(64), ) print encode( created_nsec=int(time.time() * 1e9), entropy=entropy, )
#4 Updated by Anonymous over 11 years ago
More on where that snippet should live:
- for standalone chef deployment, we want the admin run something similar, and put the JSON in the environment, so this is not just about the barclamp
- putting the script in the ceph cookbook would be enough for chef (the admin is likely to have the cookbook cloned and handy), not sure if the files in cookbook are easily accessible in crowbar at proposal creation time -- TRY THAT with ceph-cookbooks.git README.md
#5 Updated by Sage Weil over 11 years ago
- translation missing: en.field_position set to 3
#6 Updated by Sage Weil about 11 years ago
- Project changed from Ceph to devops
- Category deleted (
chef)
#7 Updated by Sage Weil about 11 years ago
- translation missing: en.field_position deleted (
4) - translation missing: en.field_position set to 1
#8 Updated by Anonymous about 11 years ago
- Target version set to v0.50
- translation missing: en.field_position deleted (
1) - translation missing: en.field_position set to 84
#9 Updated by Anonymous about 11 years ago
- translation missing: en.field_story_points set to 5
- translation missing: en.field_position deleted (
83) - translation missing: en.field_position set to 83
#10 Updated by Anonymous about 11 years ago
- Status changed from New to In Progress
- Assignee set to Tyler Brekke
#11 Updated by Tyler Brekke about 11 years ago
Currently have fsid generated via uuidgen, monitor is generated via the python script which is residing in barclamp-ceph/bin
initial is set based on the assigned roles.
#12 Updated by Anonymous about 11 years ago
- Status changed from In Progress to Resolved
Done as of barclamp-ceph.git commit 36842bd3e3db9fea65e2921bb7b57e9088964621.