From the bash man page:
set -e exit immediately ... The shell does not exit ... if the
command's return value is being inverted with !
Add an explicit exit 1 where appropriate.
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Previously the code was there for storing in
the SessionMap table, but not for the ESession
logevent.
Fixes: #9518
Signed-off-by: John Spray <john.spray@redhat.com>
Populated with hostname and entity_id by
default, with interface for outer layers
like ceph_fuse, libcephfs to inject their
own metadata.
Signed-off-by: John Spray <john.spray@redhat.com>
...so that we can read out the mount point between init
and start() in order to feed it to Client before it connects
to the MDS.
Signed-off-by: John Spray <john.spray@redhat.com>
Following sequence of events can happen.
- Client releases an inode, queues cap release message.
- A 'lookup' reply brings the same inode back, but the reply
doesn't contain xattrs because MDS didn't receive the cap release
message and thought client already has up-to-data xattrs.
The fix is force sending a getattr request to MDS if xattrs_version is 0.
The getattr mask is set to CEPH_STAT_CAP_XATTR, so MDS knows client does
not have xattr.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
* Removing tiers from a base pool in use by CephFS is forbidden.
* Using CephFS pools as tiers is forbidden.
Signed-off-by: John Spray <john.spray@redhat.com>
Fixes two things:
* EC pools are now permissible if they have a cache overlay
* Pools are not permissible if they are a cache tier.
Fixes: #9435
Signed-off-by: John Spray <john.spray@redhat.com>
The auth_cephx_key check always fails if there is a default
keyring in /etc/ceph/ available. Check if keyring exists and
fail with error message if keyring file in path.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Make sure symlinks are resolved in command_fixture()
before compare result of which command and the current
path.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
set new inode's xattr version to 1 even if it has no xattr. This allow
client to differentiate no xattr in inode from MDS skips sending xattr
to client (because MDS think client already has uptodate xattr).
Signed-off-by: Yan, Zheng <zyan@redhat.com>
This is mostly relevant in testing clusters, but it ensures that an OSD
disconnecting from the monitor at the wrong time will still see any recent
map updates and prevent accidental loss of map injection into the OSD cluster.
Fixes: #9219
Signed-off-by: Greg Farnum <greg@inktank.com>
Cancel the command op timeout event before we clear out the op from the
session struct. This isn't strictly necessary because command_op_cancel
will "gracefully" handle the case where the tid is no longer present, but
this avoids that noise and is cleaner.
Signed-off-by: Sage Weil <sage@redhat.com>