Bug 987455 - Changelog - volume set encoding ascii still creates changelogs in binary format
Changelog - volume set encoding ascii still creates changelogs in binary format
Status: CLOSED NOTABUG
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: geo-replication (Show other bugs)
2.1
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Venky Shankar
Sudhir D
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-23 08:14 EDT by M S Vishwanath Bhat
Modified: 2016-05-31 21:56 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-24 01:13:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description M S Vishwanath Bhat 2013-07-23 08:14:32 EDT
Description of problem:
volume set encoding ascii still creates the  changelogs in the binary format.

Version-Release number of selected component (if applicable):
[root@mustang ~]# rpm -q glusterfs
glusterfs-3.4.0.12rhs.beta5-2.el6rhs.x86_64


How reproducible:
Always

Steps to Reproduce:
1. Create and start a volume 'hosdu'
2. gluster v set hosdu chanagelog-enabled on
3. gluster v set hosdu encoding ascii

Actual results:

[root@mustang ~]# gluster v i
 
Volume Name: hosa-master
Type: Distributed-Replicate
Volume ID: f1b5ef32-ad22-4985-8778-083c876bc394
Status: Started
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: spitfire:/rhs/bricks/brick1
Brick2: mustang:/rhs/bricks/brick2
Brick3: harrier:/rhs/bricks/brick3
Brick4: typhoon:/rhs/bricks/brick4
Options Reconfigured:
changelog.rollover-time: 20
changelog.encoding: ascii
diagnostics.latency-measurement: on
diagnostics.count-fop-hits: on
geo-replication.indexing: on



The changelog files created are still binary format

[root@mustang ~]# file /rhs/bricks/brick2/.glusterfs/changelogs/CHANGELOG
/rhs/bricks/brick2/.glusterfs/changelogs/CHANGELOG: data


[root@mustang ~]# less /rhs/bricks/brick2/.glusterfs/changelogs/CHANGELOG
"/rhs/bricks/brick2/.glusterfs/changelogs/CHANGELOG" may be a binary file.  See it anyway?

If I choose 'yes' to the above question, garbage will be printed on my screen.

Expected results:
changelog should be logged in ascii format when set via CLI.

Additional info:
Comment 2 M S Vishwanath Bhat 2013-07-23 08:19:14 EDT
The peculiarity here is, when there is no IO happening on the mount, the changelog generated will be empty. And in that case the format it ASCII

[root@mustang ~]# file /rhs/bricks/brick2/.glusterfs/changelogs/CHANGELOG
/rhs/bricks/brick2/.glusterfs/changelogs/CHANGELOG: ASCII text
[root@mustang ~]# cat /rhs/bricks/brick2/.glusterfs/changelogs/CHANGELOG
GlusterFS Changelog | version: v1.0 | encoding : 2


But whenever there is IO happening and there is actual data entry in the chaneglog, the format is binary.
Comment 3 Venky Shankar 2013-07-24 01:13:05 EDT
It's an ASCII changelog because of the content viz. GFID and other records which are persisted in it's canonical form. The records themselves are separated with '\0' (which could be why you are prompted while cat'ing it).

When the changelog is empty, there are no records and there is no prompt during viewing it.

Note You need to log in before you can comment on or make changes to this bug.