Bug 987455 - Changelog - volume set encoding ascii still creates changelogs in binary format
Summary: Changelog - volume set encoding ascii still creates changelogs in binary format
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: geo-replication
Version: 2.1
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Venky Shankar
QA Contact: Sudhir D
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-23 12:14 UTC by M S Vishwanath Bhat
Modified: 2016-06-01 01:56 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-24 05:13:05 UTC
Embargoed:


Attachments (Terms of Use)

Description M S Vishwanath Bhat 2013-07-23 12:14:32 UTC
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 12:19:14 UTC
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 05:13:05 UTC
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.