problems with ceph.init / etc/hosts and ceph.conf
Hello list,
i've some problems to find the correct combination of ceph.conf, /etc/hosts for the init script to work correctly.
My systems are named:
ssdstor000i
ssdstor001i
ssdstor002i
These names point to the public external IP.
These systems also have an alias (ssdstor000,ssdstor001) pointing to the internal IP which should be used by ceph.
My ceph.conf looks like this:
...
[osd.10]
host= ssdstor000
[osd.11]
host= ssdstor000
...
The ceph.init Script looks now for an entry called ssdstor000i but can't find one and so it does not start or stop any services.
My /etc/hosts file:
192.168.0.100 ssdstor000.XYZ.de ssdstor000i
10.0.255.100 ssdstor000
What is the correct way to archieve that the default hostname is still the public one but ceph uses the internal one?
Greets
Stefan
Quoted 10 lines · Stefan Priebe - Profihost AG
Hello list,
i've some problems to find the correct combination of ceph.conf,
/etc/hostsfor the init script to work correctly.My systems are named:
ssdstor000i
ssdstor001i
ssdstor002i
What does hostname | cut -d . -f 1 say?
This is looked up by the init script, see: /usr/lib/ceph/ceph_common.sh
Quoted 17 lines
These names point to the public external IP.
These systems also have an alias (ssdstor000,ssdstor001) pointing to the internal IP which should be used by ceph.
My ceph.conf looks like this:
...
[osd.10]
host= ssdstor000
[osd.11]
host= ssdstor000
...The ceph.init Script looks now for an entry called ssdstor000i but can't find one and so it does not start or stop any services.
Quoted 7 lines
My
/etc/hostsfile:
192.168.0.100 ssdstor000.XYZ.de ssdstor000i10.0.255.100 ssdstor000
What is the correct way to archieve that the default hostname is still the public one but ceph uses the internal one?
You can specify --hostname with the init script, but I recommend using the hostnames which is set in /etc/hostname in your ceph.conf
Wido
Quoted 7 lines
Greets
Stefan
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Am 20.06.2012 11:13, schrieb Wido den Hollander:
Quoted 6 lines · Stefan Priebe - Profihost AG
Quoted 5 lines
Hello list,
i've some problems to find the correct combination of ceph.conf,
/etc/hostsfor the init script to work correctly.
Quoted 6 lines
Quoted 5 lines
My systems are named:
ssdstor000i
ssdstor001i
ssdstor002iWhat does hostname | cut -d . -f 1 say?
It says ssdstor000i as the machine defaults to it's public IP.
Whouldn't it make sense to go through all aliases set in /etc/hosts which point to a local IP?
Stefan
Am 20.06.2012 11:20, schrieb Stefan Priebe - Profihost AG:
Quoted 12 lines
Am 20.06.2012 11:13, schrieb Wido den Hollander:
Quoted 11 lines · Stefan Priebe - Profihost AG
Quoted 10 lines
Hello list,
i've some problems to find the correct combination of ceph.conf,
/etc/hostsfor the init script to work correctly.My systems are named:
ssdstor000i
ssdstor001i
ssdstor002i
Quoted 5 lines
Quoted 1 line
What does hostname | cut -d . -f 1 say?
It says ssdstor000i as the machine defaults to it's public IP.
Whouldn't it make sense to go through all aliases set in
/etc/hostswhich point to a local IP?
I found mon addr to specify a different address than the hostname is set but i haven't found osd addr does this exist too?
So i'm able to set the hostname to the public IP but let ceph still use the internal ones.
Stefan
Quoted 12 lines · Stefan Priebe - Profihost AG
Am 20.06.2012 11:13, schrieb Wido den Hollander:
Quoted 11 lines · Stefan Priebe - Profihost AG
Quoted 10 lines
Hello list,
i've some problems to find the correct combination of ceph.conf,
/etc/hostsfor the init script to work correctly.My systems are named:
ssdstor000i
ssdstor001i
ssdstor002i
Quoted 5 lines
Quoted 1 line
What does hostname | cut -d . -f 1 say?
It says ssdstor000i as the machine defaults to it's public IP.
Whouldn't it make sense to go through all aliases set in
/etc/hostswhich point to a local IP?
Ceph is not really intended to work with public or private IP's.
The idea is that you have a Layer 2 or Layer 3 network over which all the daemons and clients connect over a routable network, peer-to-peer, no NAT in it's way.
You can however have a seperate "osd" network where the OSD's interconnect for their replication traffic, but that has nothing to do with the hostnames.
You can take a look at the configuration options "public_addr" and "cluster_addr" for these.
Besides that, Ceph would run on a "private" network. If you have KVM hosts these will have a WAN connection over which they (and their VM's) communicate with the outside world and over a dedicated NIC the host communicates with the Ceph cluster.
I'd recommend sticking with 1 IP-Address for each OSD, keep it simple.
Wido
Quoted 6 lines
Stefan
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines · Stefan Priebe - Profihost AG
Quoted 1 line
What does hostname | cut -d . -f 1 say?
It says ssdstor000i as the machine defaults to it's public IP.
Whouldn't it make sense to go through all aliases set in
/etc/hostswhich point to a local IP?
Actually, the short hostname of the machine is completely unrelated to what IP addresses etc it has. The hostname is a configurable string. We treat it as such -- it's just expected to be a unique identifier for the host.
There's no nice, reliable way to look up aliases that point to a local IP. /etc/hosts is meant to be accessed through a library that also uses DNS, and you really don't want to tie your daemon startup to DNS availability and functioning.
Am 20.06.2012 um 18:39 schrieb Tommi Virtanen <[email protected]>:
Quoted 14 lines
Quoted 6 lines · Stefan Priebe - Profihost AG
Quoted 1 line
What does hostname | cut -d . -f 1 say?
It says ssdstor000i as the machine defaults to it's public IP.
Whouldn't it make sense to go through all aliases set in
/etc/hostswhich point to a local IP?Actually, the short hostname of the machine is completely unrelated to what IP addresses etc it has. The hostname is a configurable string. We treat it as such -- it's just expected to be a unique identifier for the host.
Quoted 4 lines
There's no nice, reliable way to look up aliases that point to a local IP.
/etc/hostsis meant to be accessed through a library that also uses DNS, and you really don't want to tie your daemon startup to DNS availability and functioning.
Correct. So i should just change the /etc/hostname to the name that points to the internal ip via hosts file?
Quoted 5 lines · Stefan Priebe
Quoted 4 lines
Actually, the short hostname of the machine is completely unrelated to what IP addresses etc it has. The hostname is a configurable string. We treat it as such -- it's just expected to be a unique identifier for the host.
Correct. So i should just change the
/etc/hostnameto the name that points to the internal ip via hosts file?
/etc/hostname is read into the kernel at bootup, using the /bin/hostname command. So after editing, either reboot or use sudo hostname --file /etc/hostname. Other than that, yes.