Skip to content

Instantly share code, notes, and snippets.

exec { 'ceph-admin-key':
command => "ceph-authtool /etc/ceph/keyring \
--create-keyring \
--name=client.admin \
--add-key \
$(ceph --name mon. --keyring ${mon_data_real}/keyring \
auth get-or-create-key client.admin \
mon 'allow *' \
osd 'allow *' \
mds allow)",
# for token:
# https://discovery.etcd.io/a6153b2206f049b15c7f8046639c18ec
[etcd] Sep 30 18:14:45.248 INFO | Discovery via https://discovery.etcd.io using prefix /a6153b2206f049b15c7f8046639c18ec.
[etcd] Sep 30 18:14:47.656 WARNING | Discovery encountered an error: 501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]
[etcd] Sep 30 18:14:47.656 WARNING | etcd1.domain.name failed to connect discovery service[https://discovery.etcd.io/a6153b2206f049b15c7f8046639c18ec]: 501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]
[etcd] Sep 30 18:14:47.656 CRITICAL | etcd1.domain.name, the new instance, must register itself to discovery service as required
[etcd] Sep 30 18:14:47.677 INFO | Discovery via https://discovery.etcd.io using prefix /a6153b2206f049b15c7f8046639c18ec.
126,1 Bot
[etcd] Sep 30 18:15:36.426 CRITICAL | etcd1.domain.name, the new instance, must register itself to discovery service as required
[etcd] Sep 30 18:15:36.444 INFO | Discovery via https://discovery.etcd.io using prefix /a6153b2206f049b15c7f8046639c18ec.
[etcd] Sep 30 18:15:38.847 WARNING | Discovery encountered an error: 501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]
[etcd] Sep 30 18:15:38.847 WARNING | etcd1.domain.name failed to connect discovery service[https://discovery.etcd.io/a6153b2206f049b15c7f8046639c18ec]: 501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]
[etcd] Sep 30 18:15:38.847 CRITICAL | etcd1.domain.nam
INFO 19:45:12,634 JVM vendor/version: OpenJDK 64-Bit Server VM/1.7.0_65
WARN 19:45:12,635 OpenJDK is not recommended. Please upgrade to the newest Oracle Java release
INFO 19:45:12,635 Heap size: 250544128/251592704
INFO 19:45:12,635 Classpath: /usr/share/cassandra/lib/antlr-3.2.jar:/usr/share/cassandra/lib/avro-1.4.0-fixes.jar:/usr/share/cassandra/lib/avro-1.4.0-sources-fixes.jar:/usr/share/cassandra/lib/commons-cli-1.1.jar:/usr/share/cassandra/lib/commons-codec-1.2.jar:/usr/share/cassandra/lib/commons-lang-2.6.jar:/usr/share/cassandra/lib/compress-lzf-0.8.4.jar:/usr/share/cassandra/lib/concurrentlinkedhashmap-lru-1.3.jar:/usr/share/cassandra/lib/guava-13.0.1.jar:/usr/share/cassandra/lib/high-scale-lib-1.1.2.jar:/usr/share/cassandra/lib/jackson-core-asl-1.9.2.jar:/usr/share/cassandra/lib/jackson-mapper-asl-1.9.2.jar:/usr/share/cassandra/lib/jamm-0.2.5.jar:/usr/share/cassandra/lib/jbcrypt-0.3m.jar:/usr/share/cassandra/lib/jline-1.0.jar:/usr/share/cassandra/lib/json-simple-1.1.jar:/usr/share/cassandra/lib/l
def test_get_failures(self):
with mock.patch.object(self.do, '_etcd') as etcd:
results = {
'should_pass': [
[],
{'puppet': [self.EtcdKey('/status/puppet/failed')]},
{'validation': [self.EtcdKey('/status/validation/failed')]},
],
'should_fail': [
{'puppet': [self.EtcdKey('/status/puppet/failed/foo')]},
def test_get_failures(self):
with mock.patch.object(self.do, '_etcd') as etcd:
results = {
'should_pass': [
[],
[self.EtcdKey('/status/puppet/failed')],
#[self.EtcdKey('/status/validation/failed')]
]
}
for k,v in results.iteritems():
node /contrailcontroller/ {
include ::zookeeper
include ::rabbitmq
include ::contrail::server
# etc
}
rjil::jiocloud::etcd::addr: "%{ipaddress_eth1}:4001"
rjil::jiocloud::etcd::peer_addr: "%{ipaddress_eth1}:7001"
db_host: 10.22.4.22
rjil::db::bind_address: "%{ipaddress_eth2}"
keystone::admin_bind_host: "%{ipaddress_eth2}"
keystone::public_bind_host: "%{ipaddress_eth1}"
rjil::haproxy::openstack::keystone_ips:
- 10.22.3.22
- 10.22.3.21
rjil::haproxy::openstack::keystone_internal_ips:
services::etcd::eth0: [162.209.9.153]
services::etcd::eth1: [10.178.8.56]
services::etcd::lo: [127.0.0.1]
services::keystonewithdb::eth0: [162.209.9.100]
services::keystonewithdb::eth1: [10.178.7.139]
services::keystonewithdb::lo: [127.0.0.1]
#!/bin/bash
discovery_token=$(facter etcd_discovery_token)
# Exit codes:
# 0: Yup, there's an update
# 1: No, no updates
# 2: Could not reach etcd, so we don't know
# 3: Could not reach etcd, but we also haven't been initialised ourselves.
python -m jiocloud.orchestrate --discovery_token=$discovery_token pending_update
rv=$?