Errocodes over the line....
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 12 lines · Willem Jan Withagen
Quoted 3 lines · Sage Weil
It does. There is a helper somewhere that maps error codes in MOSDOpReply that go over the wire that was added for an AIX port a year or two ago. look for
errorcode32_tandceph_to_host_errnoetc'mmm
It looks like it is the other way around as what I'm looking for... These are the linux errno's translated to AIX/Darwin codes. So the native OS does not get upset when playing client. These .cc files are not even compiled in the standard ceph tree, as far as I can see.
Quoted 6 lines
So I guess what I'm looking for is to issue the correct errorcodes on the line when also acting as server. And as far as I can imagine will need both:
ceph_to_host_errno()andhost_to_ceph_errno()and start glueing that in.
Now the question is: I that restricted to one location to insert as well, or go I need to go chasing all places where the errcode is de/encoded.
1. Write the ceph_to_host_errno and host_to_ceph_errno methods
2. Fix the errorcode32_t to use them for encode *and* decode.
3. Identify the handful of places where we send errcodes over the wire (mostly MOSDOpReply and friends) and switch the type to errorcode32_t so that it is translated during encode/decode.
Happy to help with 2 and 3 once we have 1 in place!
sage
Quoted 30 lines
--WjW
Quoted 25 lines · Willem Jan Withagen
Quoted 23 lines
Hi Sage
I came accros the following, dataing september 2011, writen by you:
====
These error codes pass over the wire, so we should make sure the actual values are consistent across the platforms, so a FreeBSD client can talk to a Linux server, or vice-versa.I'm not sure if that's the case for other error codes...?
====Now the trick question is: Does ENODATA travel over the wire?
Because the way I designed it now
ENOATTR on FreeBSD is 87
ENODATA on Linux is 61So that is not going to match, if it is communicated.
--WjW
Quoted 20 lines · Sage Weil
Quoted 12 lines · Willem Jan Withagen
Quoted 3 lines · Sage Weil
It does. There is a helper somewhere that maps error codes in MOSDOpReply that go over the wire that was added for an AIX port a year or two ago. look for
errorcode32_tandceph_to_host_errnoetc'mmm
It looks like it is the other way around as what I'm looking for... These are the linux errno's translated to AIX/Darwin codes. So the native OS does not get upset when playing client. These .cc files are not even compiled in the standard ceph tree, as far as I can see.
Quoted 6 lines
So I guess what I'm looking for is to issue the correct errorcodes on the line when also acting as server. And as far as I can imagine will need both:
ceph_to_host_errno()andhost_to_ceph_errno()and start glueing that in.
Now the question is: I that restricted to one location to insert as well, or go I need to go chasing all places where the errcode is de/encoded.
Quoted 7 lines
1. Write the
ceph_to_host_errnoandhost_to_ceph_errnomethods
2. Fix theerrorcode32_tto use them for encode *and* decode.
3. Identify the handful of places where we send errcodes over the wire (mostly MOSDOpReply and friends) and switch the type toerrorcode32_tso that it is translated during encode/decode.Happy to help with 2 and 3 once we have 1 in place!
Great,
Started working on 1, only to realise how disjunct they are. I guess 3 will be the hardest not to miss any spots.
As our Austrian-American friend says: I'll be back.
--WjW
Quoted 26 lines
Quoted 26 lines
Quoted 24 lines · Willem Jan Withagen
Quoted 23 lines
Hi Sage
I came accros the following, dataing september 2011, writen by you:
====
These error codes pass over the wire, so we should make sure the actual values are consistent across the platforms, so a FreeBSD client can talk to a Linux server, or vice-versa.I'm not sure if that's the case for other error codes...?
====Now the trick question is: Does ENODATA travel over the wire?
Because the way I designed it now
ENOATTR on FreeBSD is 87
ENODATA on Linux is 61So that is not going to match, if it is communicated.
--WjW
Quoted 21 lines · Willem Jan Withagen
Quoted 20 lines · Sage Weil
Quoted 18 lines · Willem Jan Withagen
Quoted 3 lines · Sage Weil
It does. There is a helper somewhere that maps error codes in MOSDOpReply that go over the wire that was added for an AIX port a year or two ago. look for
errorcode32_tandceph_to_host_errnoetc'mmm
It looks like it is the other way around as what I'm looking for... These are the linux errno's translated to AIX/Darwin codes. So the native OS does not get upset when playing client. These .cc files are not even compiled in the standard ceph tree, as far as I can see.
So I guess what I'm looking for is to issue the correct errorcodes on the line when also acting as server. And as far as I can imagine will need both:
ceph_to_host_errno()andhost_to_ceph_errno()and start glueing that in.
Now the question is: I that restricted to one location to insert as well, or go I need to go chasing all places where the errcode is de/encoded.
Quoted 7 lines
Quoted 7 lines
1. Write the
ceph_to_host_errnoandhost_to_ceph_errnomethods
2. Fix theerrorcode32_tto use them for encode *and* decode.
3. Identify the handful of places where we send errcodes over the wire (mostly MOSDOpReply and friends) and switch the type toerrorcode32_tso that it is translated during encode/decode.Happy to help with 2 and 3 once we have 1 in place!
First attempt at 1) and 2) in https://github.com/ceph/ceph/pull/15495.
I took the darwin version as template.
If you like the array approach, I will also convert the original ceph_to_host to array as well. (Or the other way around)
--WjW