diff options
| -rw-r--r-- | xlators/cluster/afr/src/afr-messages.h | 11 | ||||
| -rw-r--r-- | xlators/cluster/afr/src/afr.c | 7 | 
2 files changed, 17 insertions, 1 deletions
| diff --git a/xlators/cluster/afr/src/afr-messages.h b/xlators/cluster/afr/src/afr-messages.h index 3483621d561..fca94eeff6b 100644 --- a/xlators/cluster/afr/src/afr-messages.h +++ b/xlators/cluster/afr/src/afr-messages.h @@ -40,7 +40,7 @@   */  #define GLFS_COMP_BASE_AFR      GLFS_MSGID_COMP_AFR -#define GLFS_NUM_MESSAGES       39 +#define GLFS_NUM_MESSAGES       40  #define GLFS_MSGID_END          (GLFS_COMP_BASE_AFR + GLFS_NUM_MESSAGES + 1)  #define glfs_msg_start_x GLFS_COMP_BASE_AFR, "Invalid: Start of messages" @@ -342,5 +342,14 @@  #define AFR_MSG_REPLACE_BRICK_FAILED                (GLFS_COMP_BASE_AFR + 39) +/*! + * @messageid 108039 + * @diagnosis AFR was unable to be loaded because the pending-changelog xattrs + * were not found in the volfile. + * @recommendedaction Please ensure cluster op-version is atleast 30707 and the + * volfiles are regenerated. +*/ +#define AFR_MSG_NO_CHANGELOG  (GLFS_COMP_BASE_AFR + 40) +  #define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"  #endif /* !_AFR_MESSAGES_H_ */ diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c index a3a4490d063..98e4d3e2699 100644 --- a/xlators/cluster/afr/src/afr.c +++ b/xlators/cluster/afr/src/afr.c @@ -407,6 +407,13 @@ init (xlator_t *this)                  ret = -ENOMEM;                  goto out;          } +        if (!xattrs_list) { +                ret = -EINVAL; +                gf_msg (this->name, GF_LOG_ERROR, -ret, AFR_MSG_NO_CHANGELOG, +                        "Unable to fetch afr pending changelogs. Is op-version" +                        " >= 30707?"); +                goto out; +        }          ptr = gf_strdup (xattrs_list);          if (!ptr) {                  ret = -ENOMEM; | 
