<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/geo-replication/syncdaemon/gsyncdconfig.py, branch v7.1</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>geo-rep: Fix the name of changelog archive file</title>
<updated>2019-11-06T16:59:14+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2019-08-16T10:37:03+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=76c10070fdbd091545f481a3eb35bcc3e75c5946'/>
<id>76c10070fdbd091545f481a3eb35bcc3e75c5946</id>
<content type='text'>
Background:
The processed changelogs are archived each month in a single tar file.
The default format is "archive_YYYYMM.tar" which is specified as "%%Y%%m"
in configuration file.

Problem:
The created changelog archive file didn't have corresponding year
and month. It created as "archive_%Y%m.tar" on python2 only systems.

Cause and Fix:
Geo-rep expects "%Y%m" after the ConfigParser reads it from config file.
Since it was "%%Y%%m" in config file, geo-rep used to get correct value
"%Y%m" in python3 and "%%Y%%m" in python2 which is incorrect.
The fix can be to use "%Y%m" in config file but that fails in python3.
So the fix is to use "RawConfigParser" in geo-rep and use "%Y%m". This
works both in python2 and python3.

Backport of:
 &gt; Patch: https://review.gluster.org/23248
 &gt; Change-Id: Ie5b7d2bc04d0d53cd1769e064c2d67aaf95d557c
 &gt; BUG: 1741890
 &gt; Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;

Change-Id: Ie5b7d2bc04d0d53cd1769e064c2d67aaf95d557c
fixes: bz#1764023
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Background:
The processed changelogs are archived each month in a single tar file.
The default format is "archive_YYYYMM.tar" which is specified as "%%Y%%m"
in configuration file.

Problem:
The created changelog archive file didn't have corresponding year
and month. It created as "archive_%Y%m.tar" on python2 only systems.

Cause and Fix:
Geo-rep expects "%Y%m" after the ConfigParser reads it from config file.
Since it was "%%Y%%m" in config file, geo-rep used to get correct value
"%Y%m" in python3 and "%%Y%%m" in python2 which is incorrect.
The fix can be to use "%Y%m" in config file but that fails in python3.
So the fix is to use "RawConfigParser" in geo-rep and use "%Y%m". This
works both in python2 and python3.

Backport of:
 &gt; Patch: https://review.gluster.org/23248
 &gt; Change-Id: Ie5b7d2bc04d0d53cd1769e064c2d67aaf95d557c
 &gt; BUG: 1741890
 &gt; Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;

Change-Id: Ie5b7d2bc04d0d53cd1769e064c2d67aaf95d557c
fixes: bz#1764023
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>geo-rep: Fix Config Get Race</title>
<updated>2019-11-06T16:59:14+00:00</updated>
<author>
<name>Aravinda VK</name>
<email>avishwan@redhat.com</email>
</author>
<published>2019-08-05T13:30:21+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=d41f4f488e1fdebf87747c8a641a43dc80120bdb'/>
<id>d41f4f488e1fdebf87747c8a641a43dc80120bdb</id>
<content type='text'>
When two threads(sync jobs) in Geo-rep worker calls `gconf.get` and
`gconf.getr`(realtime) at the sametime, `getr` resets the conf object
and other one gets None. Thread Lock is introduced to fix the issue.

```
  File "/usr/libexec/glusterfs/python/syncdaemon/syncdutils.py",
  line 368, in twrap
    tf(*aargs)
  File "/usr/libexec/glusterfs/python/syncdaemon/master.py", line 1987,
  in syncjob
    po = self.sync_engine(pb, self.log_err)
  File "/usr/libexec/glusterfs/python/syncdaemon/resource.py",
  line 1444, in rsync
    rconf.ssh_ctl_args + \
AttributeError: 'NoneType' object has no attribute 'split'
```

Backport of:
 &gt; Patch: https://review.gluster.org/23158
 &gt; Change-Id: I9c245e5c36338265354e158f5baa32b119eb2da5
 &gt; BUG: 1737484
 &gt; Signed-off-by: Aravinda VK &lt;avishwan@redhat.com&gt;

Change-Id: I9c245e5c36338265354e158f5baa32b119eb2da5
fixes: bz#1764015
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When two threads(sync jobs) in Geo-rep worker calls `gconf.get` and
`gconf.getr`(realtime) at the sametime, `getr` resets the conf object
and other one gets None. Thread Lock is introduced to fix the issue.

```
  File "/usr/libexec/glusterfs/python/syncdaemon/syncdutils.py",
  line 368, in twrap
    tf(*aargs)
  File "/usr/libexec/glusterfs/python/syncdaemon/master.py", line 1987,
  in syncjob
    po = self.sync_engine(pb, self.log_err)
  File "/usr/libexec/glusterfs/python/syncdaemon/resource.py",
  line 1444, in rsync
    rconf.ssh_ctl_args + \
AttributeError: 'NoneType' object has no attribute 'split'
```

Backport of:
 &gt; Patch: https://review.gluster.org/23158
 &gt; Change-Id: I9c245e5c36338265354e158f5baa32b119eb2da5
 &gt; BUG: 1737484
 &gt; Signed-off-by: Aravinda VK &lt;avishwan@redhat.com&gt;

Change-Id: I9c245e5c36338265354e158f5baa32b119eb2da5
fixes: bz#1764015
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>geo-rep: Test case for upgrading config file</title>
<updated>2019-11-06T16:59:14+00:00</updated>
<author>
<name>Shwetha K Acharya</name>
<email>sacharya@redhat.com</email>
</author>
<published>2019-07-02T09:30:25+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=05f9340a533982ec5e421309673de6530fc28ed5'/>
<id>05f9340a533982ec5e421309673de6530fc28ed5</id>
<content type='text'>
Added test case for the patch
https://review.gluster.org/#/c/glusterfs/+/22894/4

Also updated if else structure in gsyncdconfig.py to avoid
repeated occurance of values in new configfile.

Backport of:
 &gt; Patch: https://review.gluster.org/22982
 &gt; BUG: 1707731
 &gt; Change-Id: If97e1d37ac52dbd17d47be6cb659fc5a3ccab6d7
 &gt; Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;

fixes: bz#1764003
Change-Id: If97e1d37ac52dbd17d47be6cb659fc5a3ccab6d7
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added test case for the patch
https://review.gluster.org/#/c/glusterfs/+/22894/4

Also updated if else structure in gsyncdconfig.py to avoid
repeated occurance of values in new configfile.

Backport of:
 &gt; Patch: https://review.gluster.org/22982
 &gt; BUG: 1707731
 &gt; Change-Id: If97e1d37ac52dbd17d47be6cb659fc5a3ccab6d7
 &gt; Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;

fixes: bz#1764003
Change-Id: If97e1d37ac52dbd17d47be6cb659fc5a3ccab6d7
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>geo-rep: Upgrading config file to new version</title>
<updated>2019-11-06T16:59:14+00:00</updated>
<author>
<name>Shwetha K Acharya</name>
<email>sacharya@redhat.com</email>
</author>
<published>2019-05-29T11:19:01+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=60eba49c6290d6f387986fdb41d37c613ad766b6'/>
<id>60eba49c6290d6f387986fdb41d37c613ad766b6</id>
<content type='text'>
- configuration handling is enhanced with patch
https://review.gluster.org/#/c/glusterfs/+/18257/
- hence, the old configurations are not applied when
Geo-rep session is created in the old version and upgraded.

This patch solves the issue. It,
- checks if the config file is old.
- parses required values from old config file and stores in new
  config file, which ensures that configerations are applied on
  upgrade.
- stores old config file as backup.
- handles changes in options introduced in
  https://review.gluster.org/#/c/glusterfs/+/18257/

Backport of:
 &gt; Patch: https://review.gluster.org/22894
 &gt; BUG: bz#1707731
 &gt; Change-Id: Iad8da6c1e1ae8ecf7c84dfdf8ea3ac6966d8a2a0
 &gt; Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;

updates: bz#1764003
Change-Id: Iad8da6c1e1ae8ecf7c84dfdf8ea3ac6966d8a2a0
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- configuration handling is enhanced with patch
https://review.gluster.org/#/c/glusterfs/+/18257/
- hence, the old configurations are not applied when
Geo-rep session is created in the old version and upgraded.

This patch solves the issue. It,
- checks if the config file is old.
- parses required values from old config file and stores in new
  config file, which ensures that configerations are applied on
  upgrade.
- stores old config file as backup.
- handles changes in options introduced in
  https://review.gluster.org/#/c/glusterfs/+/18257/

Backport of:
 &gt; Patch: https://review.gluster.org/22894
 &gt; BUG: bz#1707731
 &gt; Change-Id: Iad8da6c1e1ae8ecf7c84dfdf8ea3ac6966d8a2a0
 &gt; Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;

updates: bz#1764003
Change-Id: Iad8da6c1e1ae8ecf7c84dfdf8ea3ac6966d8a2a0
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>geo-rep: fix integer config validation</title>
<updated>2019-03-27T14:34:31+00:00</updated>
<author>
<name>Aravinda VK</name>
<email>avishwan@redhat.com</email>
</author>
<published>2019-03-26T07:50:13+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=c574984e19d59e351372eacce0ce11fb36e96dd4'/>
<id>c574984e19d59e351372eacce0ce11fb36e96dd4</id>
<content type='text'>
ssh-port validation is mentioned as `validation=int` in template
`gsyncd.conf`, but not handled this during geo-rep config set.

Fixes: bz#1692666
Change-Id: I3f19d9b471b0a3327e4d094dfbefcc58ed2c34f6
Signed-off-by: Aravinda VK &lt;avishwan@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ssh-port validation is mentioned as `validation=int` in template
`gsyncd.conf`, but not handled this during geo-rep config set.

Fixes: bz#1692666
Change-Id: I3f19d9b471b0a3327e4d094dfbefcc58ed2c34f6
Signed-off-by: Aravinda VK &lt;avishwan@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>geo-rep: Fix configparser import issue</title>
<updated>2019-02-05T04:19:59+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2019-02-01T06:54:14+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=a9b51f2d1fd3a8be6496b62b989b6838b542936b'/>
<id>a9b51f2d1fd3a8be6496b62b989b6838b542936b</id>
<content type='text'>
'configparser' is backported to python2 and can
be installed using pip (pip install configparser).
So trying to import 'configparser' first and later
'ConfigParser' can cause issues w.r.t unicode strings.

Always try importing 'ConfigParser' first and then
'configparser'. This solves python2/python3 compat
issues.

Change-Id: I2a87c3fc46476296b8cb547338f35723518751cc
fixes: bz#1671637
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'configparser' is backported to python2 and can
be installed using pip (pip install configparser).
So trying to import 'configparser' first and later
'ConfigParser' can cause issues w.r.t unicode strings.

Always try importing 'ConfigParser' first and then
'configparser'. This solves python2/python3 compat
issues.

Change-Id: I2a87c3fc46476296b8cb547338f35723518751cc
fixes: bz#1671637
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>multiple: Fix python2 to python3 compat</title>
<updated>2018-09-07T03:37:02+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2018-09-05T08:30:35+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=21e78061a24a094067fb267b77c4ffaae7e762f3'/>
<id>21e78061a24a094067fb267b77c4ffaae7e762f3</id>
<content type='text'>
Change-Id: Iac241166d7a35dc7cc6cf07850f9f1bce38fe207
Updates: #411
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Iac241166d7a35dc7cc6cf07850f9f1bce38fe207
Updates: #411
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>core: switch to python3</title>
<updated>2018-09-05T02:30:10+00:00</updated>
<author>
<name>Sanju Rakonde</name>
<email>srakonde@redhat.com</email>
</author>
<published>2018-09-04T15:35:11+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=33128ef59a05f2c31c0f51919c5dd7746cebd6ef'/>
<id>33128ef59a05f2c31c0f51919c5dd7746cebd6ef</id>
<content type='text'>
Commit af0d5a9b5375a5cd87ac10b429e2b9934718ce5b changes
python2 -&gt; python3. This patch fixes a small issue introduced
by it.

Change-Id: Ib23c73683f570e8891f41476b661f37c89635fb5
updates: #411
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit af0d5a9b5375a5cd87ac10b429e2b9934718ce5b changes
python2 -&gt; python3. This patch fixes a small issue introduced
by it.

Change-Id: Ib23c73683f570e8891f41476b661f37c89635fb5
updates: #411
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>All: run codespell on the code and fix issues.</title>
<updated>2018-07-22T14:40:16+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2018-07-16T14:03:17+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=621138ce763eda8270d0a4f6d7209fd50ada8787'/>
<id>621138ce763eda8270d0a4f6d7209fd50ada8787</id>
<content type='text'>
Please review, it's not always just the comments that were fixed.
I've had to revert of course all calls to creat() that were changed
to create() ...

Only compile-tested!

Change-Id: I7d02e82d9766e272a7fd9cc68e51901d69e5aab5
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Please review, it's not always just the comments that were fixed.
I've had to revert of course all calls to creat() that were changed
to create() ...

Only compile-tested!

Change-Id: I7d02e82d9766e272a7fd9cc68e51901d69e5aab5
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>geo-rep: Fix problems in python2 -&gt; python3 compat</title>
<updated>2018-06-11T06:59:44+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2018-06-11T06:52:16+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=319aa4b0754d1f3859b180f9a416be20143d4ec1'/>
<id>319aa4b0754d1f3859b180f9a416be20143d4ec1</id>
<content type='text'>
1. Import configparser module correctly
2. Import thread module correctly

Updates: #411
Change-Id: I522453d23c256b694fa58d285f413b8c4dd6595c
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. Import configparser module correctly
2. Import thread module correctly

Updates: #411
Change-Id: I522453d23c256b694fa58d285f413b8c4dd6595c
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
