Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible-ceph-mon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Logan V
ansible-ceph-mon
Commits
f4f06ea9
Commit
f4f06ea9
authored
9 years ago
by
Sébastien Han
Browse files
Options
Downloads
Patches
Plain Diff
ceph-mon/mds: fix fqdn
closes #596 Signed-off-by:
Sébastien Han
<
seb@redhat.com
>
parent
e5d88bf9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tasks/deploy_monitors.yml
+20
-12
20 additions, 12 deletions
tasks/deploy_monitors.yml
tasks/start_monitor.yml
+6
-6
6 additions, 6 deletions
tasks/start_monitor.yml
with
26 additions
and
18 deletions
tasks/deploy_monitors.yml
+
20
−
12
View file @
f4f06ea9
...
...
@@ -14,15 +14,23 @@
become
:
false
when
:
cephx
-
set_fact
:
monitor_name
:
"
{{
ansible_hostname
}}"
when
:
not mon_use_fqdn
-
set_fact
:
monitor_name
:
"
{{
ansible_fqdn
}}"
when
:
mon_use_fqdn
-
name
:
create monitor initial keyring
command
:
ceph-authtool /var/lib/ceph/tmp/keyring.mon.{{
ansible_host
name }} --create-keyring --name=mon. --add-key={{ monitor_secret }} --cap mon 'allow *'
command
:
ceph-authtool /var/lib/ceph/tmp/keyring.mon.{{
monitor_
name }} --create-keyring --name=mon. --add-key={{ monitor_secret }} --cap mon 'allow *'
args
:
creates
:
/var/lib/ceph/tmp/keyring.mon.{{
ansible_host
name }}
creates
:
/var/lib/ceph/tmp/keyring.mon.{{
monitor_
name }}
when
:
cephx
-
name
:
set initial monitor key permissions
file
:
path
:
/var/lib/ceph/tmp/keyring.mon.{{
ansible_host
name }}
path
:
/var/lib/ceph/tmp/keyring.mon.{{
monitor_
name }}
mode
:
"
{{
key_mode
}}"
owner
:
"
{{
key_owner
}}"
group
:
"
{{
key_group
}}"
...
...
@@ -30,40 +38,40 @@
-
name
:
create monitor directory
file
:
path
:
/var/lib/ceph/mon/ceph-{{
ansible_host
name }}
path
:
/var/lib/ceph/mon/ceph-{{
monitor_
name }}
state
:
directory
owner
:
"
{{
dir_owner
}}"
group
:
"
{{
dir_group
}}"
mode
:
"
{{
dir_mode
}}"
-
name
:
ceph monitor mkfs with keyring (for or after infernalis release)
command
:
ceph-mon --setuser ceph --setgroup ceph --mkfs -i {{
ansible_host
name }} --fsid {{ fsid }} --keyring /var/lib/ceph/tmp/keyring.mon.{{
ansible_host
name }}
command
:
ceph-mon --setuser ceph --setgroup ceph --mkfs -i {{
monitor_
name }} --fsid {{ fsid }} --keyring /var/lib/ceph/tmp/keyring.mon.{{
monitor_
name }}
args
:
creates
:
/var/lib/ceph/mon/ceph-{{
ansible_host
name }}/keyring
creates
:
/var/lib/ceph/mon/ceph-{{
monitor_
name }}/keyring
when
:
cephx and
is_ceph_infernalis
-
name
:
ceph monitor mkfs without keyring (for or after infernalis release)
command
:
ceph-mon --setuser ceph --setgroup ceph --mkfs -i {{
ansible_host
name }} --fsid {{ fsid }}
command
:
ceph-mon --setuser ceph --setgroup ceph --mkfs -i {{
monitor_
name }} --fsid {{ fsid }}
args
:
creates
:
/var/lib/ceph/mon/ceph-{{
ansible_host
name }}/store.db
creates
:
/var/lib/ceph/mon/ceph-{{
monitor_
name }}/store.db
when
:
not cephx and
is_ceph_infernalis
-
name
:
ceph monitor mkfs with keyring (before infernalis release)
command
:
ceph-mon --mkfs -i {{
ansible_host
name }} --fsid {{ fsid }} --keyring /var/lib/ceph/tmp/keyring.mon.{{
ansible_host
name }}
command
:
ceph-mon --mkfs -i {{
monitor_
name }} --fsid {{ fsid }} --keyring /var/lib/ceph/tmp/keyring.mon.{{
monitor_
name }}
args
:
creates
:
/var/lib/ceph/mon/ceph-{{
ansible_host
name }}/keyring
creates
:
/var/lib/ceph/mon/ceph-{{
monitor_
name }}/keyring
when
:
cephx and
not is_ceph_infernalis
-
name
:
ceph monitor mkfs without keyring (before infernalis release)
command
:
ceph-mon --mkfs -i {{
ansible_host
name }} --fsid {{ fsid }}
command
:
ceph-mon --mkfs -i {{
monitor_
name }} --fsid {{ fsid }}
args
:
creates
:
/var/lib/ceph/mon/ceph-{{
ansible_host
name }}/store.db
creates
:
/var/lib/ceph/mon/ceph-{{
monitor_
name }}/store.db
when
:
not cephx and
not is_ceph_infernalis
This diff is collapsed.
Click to expand it.
tasks/start_monitor.yml
+
6
−
6
View file @
f4f06ea9
---
-
name
:
activate monitor with upstart
file
:
path
:
/var/lib/ceph/mon/ceph-{{
ansible_host
name }}/{{ item }}
path
:
/var/lib/ceph/mon/ceph-{{
monitor_
name }}/{{ item }}
state
:
touch
owner
:
"
{{
activate_file_owner
}}"
group
:
"
{{
activate_file_group
}}"
...
...
@@ -17,7 +17,7 @@
name
:
ceph-mon
state
:
started
enabled
:
yes
args
:
"
id={{
ansible_host
name
}}"
args
:
"
id={{
monitor_
name
}}"
when
:
ansible_distribution == "Ubuntu"
# NOTE (leseb): somehow the service ansible module is messing things up
...
...
@@ -32,7 +32,7 @@
-
name
:
enable systemd unit file for mon instance (for or after infernalis)
file
:
src
:
/usr/lib/systemd/system/ceph-mon@.service
dest
:
/etc/systemd/system/multi-user.target.wants/ceph-mon@{{
ansible_host
name }}.service
dest
:
/etc/systemd/system/multi-user.target.wants/ceph-mon@{{
monitor_
name }}.service
state
:
link
changed_when
:
false
failed_when
:
false
...
...
@@ -42,7 +42,7 @@
-
name
:
start and add that the monitor service to the init sequence (for or after infernalis)
service
:
name
:
ceph-mon@{{
ansible_host
name }}
name
:
ceph-mon@{{
monitor_
name }}
state
:
started
enabled
:
yes
changed_when
:
false
...
...
@@ -51,13 +51,13 @@
is_ceph_infernalis
-
name
:
collect admin and bootstrap keys
command
:
ceph-create-keys --id {{
ansible_host
name }}
command
:
ceph-create-keys --id {{
monitor_
name }}
changed_when
:
false
failed_when
:
false
when
:
cephx
-
name
:
get ceph monitor version
shell
:
ceph daemon mon."{{
ansible_host
name }}" version | cut -d '"' -f 4 | cut -f 1,2 -d '.'
shell
:
ceph daemon mon."{{
monitor_
name }}" version | cut -d '"' -f 4 | cut -f 1,2 -d '.'
changed_when
:
false
failed_when
:
"
'No
such
file
or
directory'
in
ceph_version.stderr"
register
:
ceph_version
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment