Bug 917272
| Summary: | program to just set trusted.glusterfs.volume-id, for running glusterfs standalone | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | Ben England <bengland> | ||||
| Component: | unclassified | Assignee: | Vijay Bellur <vbellur> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | |||||
| Severity: | low | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | mainline | CC: | fharshav, gluster-bugs | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2013-11-26 22:18:47 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
This is a bug not a feature
posix.c shouldn't have to enforce setting volume-id - since volume-id is managed by Glusterd . The bug is to check for if volume-id is present in the volfile and not on brick then error out. If volume-id is not present in volfile and not on brick it is still valid case so the standalone feature is actually a bug
$ sudo glusterfs -f posix.vol -l test.log /tmp/mount
$ df -h /tmp/mount
Filesystem Size Used Avail Use% Mounted on
/home/harsha/repos/glusterfs.git/posix.vol 3.9G 512K 3.9G 1% /tmp/mount
------------------
- } else if ((size == -1) && (errno == ENODATA)) {
-
- gf_log (this->name, GF_LOG_ERROR,
- "Extended attribute trusted.glusterfs."
- "volume-id is absent");
- ret = -1;
- goto out;
-
- } else if ((size == -1) && (errno != ENODATA)) {
+ } else if ((!uuid_is_null(dict_uuid)) &&
+ (size == -1) && (errno == ENODATA)) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "Extended attribute trusted.glusterfs."
+ "volume-id is absent on brick but"
+ "present in volume specification");
+ ret = -1;
+ goto out;
+ } else if ((size == -1) && (errno != ENODATA)) {
------------------
Sending a fix right now
REVIEW: http://review.gluster.org/6357 (posix: shouldn't have to enforce setting volume-id) posted (#1) for review on master by Harshavardhana (harsha) REVIEW: http://review.gluster.org/6357 (posix: shouldn't have to enforce setting volume-id) posted (#2) for review on master by Harshavardhana (harsha) I take the whole analysis back from bug-917272#c1. The real problem here is you have 'volume-id' in our specification, for a standalone configuration for debugging such an option should be removed. volume-id is a 'glusterd' specific thing we shouldn't be dealing with that directly in a hand written specification. The fix is abandoned as it was superfluous. |
Created attachment 704481 [details] "C" program to parse string volume ID from volfile and set it in brick directory Description of problem: I tried running glusterfs standalone on my laptop using just the posix translator (simplest configuration possible), without glusterd. I built a filesystem on a loopback device and ran glusterfs. It would have worked except for the gluster volume ID, I had to write a "C" program to set the trusted.glusterfs.volume-id extended attribute on the brick directory, parsing the string uuid in the vol file to a binary format before setting it. AFAIK you can't use setfattr utility because it doesn't parse to binary. Kaleb Keithley asked me to provide the attached program. The advantage of this approach is that you don't need glusterd or gluster utility, I thought this would be simpler for debugging code. Or is this just overkill? Version-Release number of selected component (if applicable): gluster-3.4