<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/tools, branch v7.7</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>tools/glusterfind: Remove an extra argument</title>
<updated>2020-01-14T19:48:04+00:00</updated>
<author>
<name>Shwetha K Acharya</name>
<email>sacharya@redhat.com</email>
</author>
<published>2020-01-14T05:21:06+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=30a89623992bdbe22da72a97efdebdf5271ec293'/>
<id>30a89623992bdbe22da72a97efdebdf5271ec293</id>
<content type='text'>
Backport of:
   &gt; Upstream Patch: https://review.gluster.org/#/c/glusterfs/+/24011/
   &gt;fixes: bz#1790748
   &gt;Change-Id: I1cb12c975142794139456d0f8e99fbdbb03c53a1
   &gt;Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;
   &gt;(cherry picked from commit d73872e764214f8071c8915536a75bdac1e5e685)

fixes: bz#1790846
Change-Id: I1cb12c975142794139456d0f8e99fbdbb03c53a1
Signed-off-by: Sunny Kumar &lt;sunkumar@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Backport of:
   &gt; Upstream Patch: https://review.gluster.org/#/c/glusterfs/+/24011/
   &gt;fixes: bz#1790748
   &gt;Change-Id: I1cb12c975142794139456d0f8e99fbdbb03c53a1
   &gt;Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;
   &gt;(cherry picked from commit d73872e764214f8071c8915536a75bdac1e5e685)

fixes: bz#1790846
Change-Id: I1cb12c975142794139456d0f8e99fbdbb03c53a1
Signed-off-by: Sunny Kumar &lt;sunkumar@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterfind: Fix py2/py3 issues</title>
<updated>2020-01-14T19:44:28+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2020-01-10T11:18:14+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=21f1115b2575cfd421224e00a14628c8b6d32ae2'/>
<id>21f1115b2575cfd421224e00a14628c8b6d32ae2</id>
<content type='text'>
1. In dictionary values(), returns list in py2 and not in py3.
   So explicitly convert it into list.
2. xattr module returns values in bytes. So explicitly convert
   them to str to work both with py2 and py3

Backport of:

&gt;   fixes: bz#1789439
&gt;   Change-Id: I27a639cda4f7a4ece9744a97c3d16e247906bd94
&gt;   Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
&gt;   (cherry picked from commit 45894c39a4d05ed1f6a6f1bdbeafb5fe74ef29c3)

Change-Id: I27a639cda4f7a4ece9744a97c3d16e247906bd94
Fixes: bz#1790423
Signed-off-by: Sunny Kumar &lt;sunkumar@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. In dictionary values(), returns list in py2 and not in py3.
   So explicitly convert it into list.
2. xattr module returns values in bytes. So explicitly convert
   them to str to work both with py2 and py3

Backport of:

&gt;   fixes: bz#1789439
&gt;   Change-Id: I27a639cda4f7a4ece9744a97c3d16e247906bd94
&gt;   Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
&gt;   (cherry picked from commit 45894c39a4d05ed1f6a6f1bdbeafb5fe74ef29c3)

Change-Id: I27a639cda4f7a4ece9744a97c3d16e247906bd94
Fixes: bz#1790423
Signed-off-by: Sunny Kumar &lt;sunkumar@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterfind: python3 compatibility</title>
<updated>2020-01-14T19:41:46+00:00</updated>
<author>
<name>Sunny Kumar</name>
<email>sunkumar@redhat.com</email>
</author>
<published>2020-01-10T14:28:35+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=76ef90aac43f36bea581b8be97d1204cd7867b0b'/>
<id>76ef90aac43f36bea581b8be97d1204cd7867b0b</id>
<content type='text'>
Problem:
While we delete gluster volume the hook script 'S57glusterfind-delete-post.py'
is failed to execute and error message can be observed in glusterd log.

Traceback:
  File "/var/lib/glusterd/hooks/1/delete/post/S57glusterfind-delete-post", line 69, in &lt;module&gt;
    main()
  File "/var/lib/glusterd/hooks/1/delete/post/S57glusterfind-delete-post", line 39, in main
    glusterfind_dir = os.path.join(get_glusterd_workdir(), "glusterfind")
  File "/usr/lib64/python3.7/posixpath.py", line 94, in join
    genericpath._check_arg_types('join', a, *p)
  File "/usr/lib64/python3.7/genericpath.py", line 155, in _check_arg_types
    raise TypeError("Can't mix strings and bytes in path components") from None
TypeError: Can't mix strings and bytes in path components

Solution:

Added the 'universal_newlines' flag to Popen to support backward compatibility.

Backport of:

&gt;   Change-Id: Ie5655b11b55535c5ad2338108d0448e6fdaacf4f
&gt;   Fixes: bz#1789478
&gt;   Signed-off-by: Sunny Kumar &lt;sunkumar@redhat.com&gt;
&gt;   (cherry picked from commit 33c3cbe71b67f523538b04334f1ef962953281ed)

Change-Id: Ie5655b11b55535c5ad2338108d0448e6fdaacf4f
Fixes: bz#1790438
Signed-off-by: Sunny Kumar &lt;sunkumar@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
While we delete gluster volume the hook script 'S57glusterfind-delete-post.py'
is failed to execute and error message can be observed in glusterd log.

Traceback:
  File "/var/lib/glusterd/hooks/1/delete/post/S57glusterfind-delete-post", line 69, in &lt;module&gt;
    main()
  File "/var/lib/glusterd/hooks/1/delete/post/S57glusterfind-delete-post", line 39, in main
    glusterfind_dir = os.path.join(get_glusterd_workdir(), "glusterfind")
  File "/usr/lib64/python3.7/posixpath.py", line 94, in join
    genericpath._check_arg_types('join', a, *p)
  File "/usr/lib64/python3.7/genericpath.py", line 155, in _check_arg_types
    raise TypeError("Can't mix strings and bytes in path components") from None
TypeError: Can't mix strings and bytes in path components

Solution:

Added the 'universal_newlines' flag to Popen to support backward compatibility.

Backport of:

&gt;   Change-Id: Ie5655b11b55535c5ad2338108d0448e6fdaacf4f
&gt;   Fixes: bz#1789478
&gt;   Signed-off-by: Sunny Kumar &lt;sunkumar@redhat.com&gt;
&gt;   (cherry picked from commit 33c3cbe71b67f523538b04334f1ef962953281ed)

Change-Id: Ie5655b11b55535c5ad2338108d0448e6fdaacf4f
Fixes: bz#1790438
Signed-off-by: Sunny Kumar &lt;sunkumar@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools/glusterfind: handle offline bricks</title>
<updated>2020-01-13T14:54:00+00:00</updated>
<author>
<name>Milind Changire</name>
<email>mchangir@redhat.com</email>
</author>
<published>2017-01-05T14:23:19+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=cf0569e590afdb095bf0a0541bd91a502a90b461'/>
<id>cf0569e590afdb095bf0a0541bd91a502a90b461</id>
<content type='text'>
Problem:
glusterfind is unable to copy remote output file to local node when a
remove-brick is in progress on the remote node. After copying remote
files, in the --full output listing path, a "sort -u" command is run on
the collected files. However, "sort" exits with an error code if it
finds any file missing.

Solution:
Maintain a map of (pid, output file) when the node commands are started
and remove the mapping for the pid for which the command returns an
error. Use the list of files present in the map for the "sort" command.

Backport of:

&gt;    Change-Id: Ie6e019037379f4cb163f24b1c65eb382efc2fb3b
&gt;    fixes: bz#1410439
&gt;    Signed-off-by: Milind Changire &lt;mchangir@redhat.com&gt;
&gt;    Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;
&gt;    (cherry picked from commit 42c1605f42b89520d4d05806d7074e9e93b63640)

Change-Id: Ie6e019037379f4cb163f24b1c65eb382efc2fb3b
Fixes: bz#1790428
Signed-off-by: Sunny Kumar &lt;sunkumar@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
glusterfind is unable to copy remote output file to local node when a
remove-brick is in progress on the remote node. After copying remote
files, in the --full output listing path, a "sort -u" command is run on
the collected files. However, "sort" exits with an error code if it
finds any file missing.

Solution:
Maintain a map of (pid, output file) when the node commands are started
and remove the mapping for the pid for which the command returns an
error. Use the list of files present in the map for the "sort" command.

Backport of:

&gt;    Change-Id: Ie6e019037379f4cb163f24b1c65eb382efc2fb3b
&gt;    fixes: bz#1410439
&gt;    Signed-off-by: Milind Changire &lt;mchangir@redhat.com&gt;
&gt;    Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;
&gt;    (cherry picked from commit 42c1605f42b89520d4d05806d7074e9e93b63640)

Change-Id: Ie6e019037379f4cb163f24b1c65eb382efc2fb3b
Fixes: bz#1790428
Signed-off-by: Sunny Kumar &lt;sunkumar@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterfind: integrate with gfid2path</title>
<updated>2019-06-20T06:17:37+00:00</updated>
<author>
<name>Milind Changire</name>
<email>mchangir@redhat.com</email>
</author>
<published>2019-02-19T07:19:12+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=6f70d4a6377365c352dad07d8eae0b2bd7af6fc6'/>
<id>6f70d4a6377365c352dad07d8eae0b2bd7af6fc6</id>
<content type='text'>
Integration with gfid2path helps avoid file-system crawl and saves
precious time. Extended attributes starting with "trusted.gfid2path."
are read and the &lt;PGFID&gt;/&lt;BN&gt; values are extracted and the &lt;PGFID&gt; is
iteratively resolved from the brick backend to arrive at the full path.

Change-Id: I593b02880e3413b77bfceed4a36b00d401f03bc0
fixes: #529
Signed-off-by: Milind Changire &lt;mchangir@redhat.com&gt;
Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Integration with gfid2path helps avoid file-system crawl and saves
precious time. Extended attributes starting with "trusted.gfid2path."
are read and the &lt;PGFID&gt;/&lt;BN&gt; values are extracted and the &lt;PGFID&gt; is
iteratively resolved from the brick backend to arrive at the full path.

Change-Id: I593b02880e3413b77bfceed4a36b00d401f03bc0
fixes: #529
Signed-off-by: Milind Changire &lt;mchangir@redhat.com&gt;
Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools/glusterfind : validate session name</title>
<updated>2019-04-26T07:16:12+00:00</updated>
<author>
<name>Saravanakumar Arumugam</name>
<email>sarumuga@redhat.com</email>
</author>
<published>2015-07-09T10:26:28+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=6434e8687572fabd5e9092652ff36e35f868b67b'/>
<id>6434e8687572fabd5e9092652ff36e35f868b67b</id>
<content type='text'>
Validate a session name(during create) for the following:
1. minimum 2 character length.
2. Maximum 256 characters.
3. No special characters apart from underscore, hyphen allowed.

Also, validate volume(expect, while using glusterfind list).

Change-Id: I1b1e64e218f93d0a531d3cf69fc2ce7e2ed11d01
BUG: 1241494
Signed-off-by: Saravanakumar Arumugam &lt;sarumuga@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Validate a session name(during create) for the following:
1. minimum 2 character length.
2. Maximum 256 characters.
3. No special characters apart from underscore, hyphen allowed.

Also, validate volume(expect, while using glusterfind list).

Change-Id: I1b1e64e218f93d0a531d3cf69fc2ce7e2ed11d01
BUG: 1241494
Signed-off-by: Saravanakumar Arumugam &lt;sarumuga@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libgfchangelog : use find_library to locate shared library</title>
<updated>2019-04-15T14:27:59+00:00</updated>
<author>
<name>Sunny Kumar</name>
<email>sunkumar@redhat.com</email>
</author>
<published>2019-04-12T14:25:10+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=f316c8b797283818bd800569771870a4b9bf1310'/>
<id>f316c8b797283818bd800569771870a4b9bf1310</id>
<content type='text'>
Issue:

libgfchangelog.so: cannot open shared object file

Due to hardcoded shared library name runtime loader looks for particular version of
a shared library.

Solution:

Using find_library to locate shared library at runtime solves this issue.

Traceback (most recent call last):
  File "/usr/libexec/glusterfs/python/syncdaemon/gsyncd.py", line 323, in main
    func(args)
  File "/usr/libexec/glusterfs/python/syncdaemon/subcmds.py", line 82, in subcmd_worker
    local.service_loop(remote)
  File "/usr/libexec/glusterfs/python/syncdaemon/resource.py", line 1261, in service_loop
    changelog_agent.init()
  File "/usr/libexec/glusterfs/python/syncdaemon/repce.py", line 233, in __call__
    return self.ins(self.meth, *a)
  File "/usr/libexec/glusterfs/python/syncdaemon/repce.py", line 215, in __call__
    raise res
OSError: libgfchangelog.so: cannot open shared object file: No such file or directory

Change-Id: I3dd013d701ed1cd99ba7ef20d1898f343e1db8f5
fixes: bz#1699394
Signed-off-by: Sunny Kumar &lt;sunkumar@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue:

libgfchangelog.so: cannot open shared object file

Due to hardcoded shared library name runtime loader looks for particular version of
a shared library.

Solution:

Using find_library to locate shared library at runtime solves this issue.

Traceback (most recent call last):
  File "/usr/libexec/glusterfs/python/syncdaemon/gsyncd.py", line 323, in main
    func(args)
  File "/usr/libexec/glusterfs/python/syncdaemon/subcmds.py", line 82, in subcmd_worker
    local.service_loop(remote)
  File "/usr/libexec/glusterfs/python/syncdaemon/resource.py", line 1261, in service_loop
    changelog_agent.init()
  File "/usr/libexec/glusterfs/python/syncdaemon/repce.py", line 233, in __call__
    return self.ins(self.meth, *a)
  File "/usr/libexec/glusterfs/python/syncdaemon/repce.py", line 215, in __call__
    raise res
OSError: libgfchangelog.so: cannot open shared object file: No such file or directory

Change-Id: I3dd013d701ed1cd99ba7ef20d1898f343e1db8f5
fixes: bz#1699394
Signed-off-by: Sunny Kumar &lt;sunkumar@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterfind: revert shebangs to #!/usr/bin/python3</title>
<updated>2019-02-26T03:46:35+00:00</updated>
<author>
<name>Kaleb S. KEITHLEY</name>
<email>kkeithle@redhat.com</email>
</author>
<published>2019-02-22T14:25:26+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=5feeed24f1e1fe2891e1418df23bacf0cfb991e6'/>
<id>5feeed24f1e1fe2891e1418df23bacf0cfb991e6</id>
<content type='text'>
Using #!/usr/bin/env python is illegal in Fedora and RHEL packaging.
(Debian and SUSE packaging will complain about it too but don't
enforce it like Fedora packaging does. Yet.)

We went through a giant exercise fixing these once already.

The python needs to be python2/python3 clean. There is a build
scriptlet that converts the shebangs back to /usr/bin/python on rhel7.

Change-Id: If208a2557f7e5d727cda98c27905e249cf485d5b
updates: bz#1193929
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using #!/usr/bin/env python is illegal in Fedora and RHEL packaging.
(Debian and SUSE packaging will complain about it too but don't
enforce it like Fedora packaging does. Yet.)

We went through a giant exercise fixing these once already.

The python needs to be python2/python3 clean. There is a build
scriptlet that converts the shebangs back to /usr/bin/python on rhel7.

Change-Id: If208a2557f7e5d727cda98c27905e249cf485d5b
updates: bz#1193929
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterfind: python2 to python3 compat</title>
<updated>2019-02-02T03:08:45+00:00</updated>
<author>
<name>Shwetha K Acharya</name>
<email>sacharya@redhat.com</email>
</author>
<published>2018-12-10T08:15:34+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=23e530a135fc419fba401448290f8b1809e23f53'/>
<id>23e530a135fc419fba401448290f8b1809e23f53</id>
<content type='text'>
Made necessary modifications to ensure python3 compatibilty.

fixes: bz#1658116
Change-Id: I5cf1d0447eaf3c44eb444245d1f67aadd60705c3
Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Made necessary modifications to ensure python3 compatibilty.

fixes: bz#1658116
Change-Id: I5cf1d0447eaf3c44eb444245d1f67aadd60705c3
Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools/glusterfind: option to display only files/directories</title>
<updated>2019-01-23T03:16:52+00:00</updated>
<author>
<name>Shwetha K Acharya</name>
<email>sacharya@redhat.com</email>
</author>
<published>2018-12-31T05:25:21+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=d193ed84ae2886d89b899e02e9642e61bdab462a'/>
<id>d193ed84ae2886d89b899e02e9642e61bdab462a</id>
<content type='text'>
Updated full find to filter for files and directories.
--full --type f  lists only the files,
--full --type d lists only the directories,
--full (by default) lists both files and directories.

fixes: #579
Change-Id: If2c91a21a131667d5de34635c1846013e8fa20b7
Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Updated full find to filter for files and directories.
--full --type f  lists only the files,
--full --type d lists only the directories,
--full (by default) lists both files and directories.

fixes: #579
Change-Id: If2c91a21a131667d5de34635c1846013e8fa20b7
Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
