First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 192036
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Tiziano Müller <dev-zero@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Alex Moore <gentoobugs@lspeed.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
evms-2.5.5-snapshot.patch evms-2.5.5-snapshot.patch patch Alex Moore 2007-09-10 20:01 0000 1.14 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 192036 depends on: Show dependency tree
Show dependency graph
Bug 192036 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-09-10 19:57 0000
Snapshot objects can be created but not activated - and are therefore of little
use.

Reproducible: Always

Steps to Reproduce:
1.Create a snapshot feature object
2.Try to activate it

Actual Results:  
Activation fails, and errors like the following appear in
/var/log/evms-engine.log:

Sep 08 12:03:52 bristol _5_ Engine: is_object_change_pending: Change pending:
Object testsnap needs to be activated.
Sep 08 12:03:52 bristol _2_ Snapshot: activate_snapshot_parent: Error
activating snapshot testsnap
Sep 08 12:03:52 bristol _3_ Engine: activate: Error code 22 activating object
testsnap: Invalid argument
Sep 08 12:03:52 bristol _2_ Snapshot: activate_snapshot_parent: Error
activating snapshot testsnap
Sep 08 12:03:52 bristol _3_ Engine: activate: Error code 22 activating object
testsnap: Invalid argument
Sep 08 12:03:52 bristol _3_ Engine: evms_rediscover: activate() returned error
code 22: Invalid argument

Expected Results:  
Activation should succeed, and the snapshot can then be used.

The problem is documented, along with a patch to evms that fixes the issue,
here: http://www.nabble.com/Snapshots-in-kernel-2.6.19-t3556671.html. I will
attach the patch to this bug for convenience. This problem affected all 3 of my
machines running EVMS (AMD64 hardened, AMD64 gentoo, and X86 hardened), and the
patch fixed it for all of them.

------- Comment #1 From Alex Moore 2007-09-10 20:01:13 0000 -------
Created an attachment (id=130542) [edit]
evms-2.5.5-snapshot.patch

The aforementioned patch...

------- Comment #2 From rosenfield.albert@gmail.com 2007-10-26 09:04:20 0000 -------
I'd like to voice a "please fix!!!" from here too. we are a small hosting
company, I have just upgraded a production host for several customer virtual
machines, and they are now completely unable to do daily backups.

evms-engine.log:
_5_ Engine: is_object_change_pending: Change pending: Object dom0snap needs to
be activated.
_2_ Snapshot: activate_snapshot_parent: Error activating snapshot dom0snap
_3_ Engine: activate: Error code 22 activating object dom0snap: Invalid
argument
_2_ Snapshot: activate_snapshot_parent: Error activating snapshot dom0snap
_3_ Engine: activate: Error code 22 activating object dom0snap: Invalid
argument
_3_ Engine: evms_rediscover: activate() returned error code 22: Invalid
argument

------- Comment #3 From Tiziano Müller 2007-10-26 09:37:52 0000 -------
I know and I'm really sorry, but I didn't even have time to figure out whether
this patch also works with kernels <2.6.19. If someone can assure me that it
does, I'll commit the patch right away.

------- Comment #4 From rosenfield.albert@gmail.com 2007-10-26 14:24:06 0000 -------
Do you want a test against an older kernel, or against an older version of
libdevicemapper?

In case it doesn't work, do you expect someone to code a new patch that does?
Being pessimistic for a moment and assuming that it won't work, I don't have
the ability to create a new patch that does..

But. I think the patch should be applied anyway. Generally speaking, all Linux
code is best effort. It calls, it may fail on some API versions, such is life.
It's not like dotnet, where you have a development language and loader
framework specifically designed to transparently manage multiple API versions
with zero effort. Coding a whole "which version of the kernel am I running on?"
jungle into EVMS would be much duplicate effort if it had to be done in all
libraries. Rather accept that with regards to version management, we'll have to
wait till the entire Linux community steps up and does something intelligent,
and until then the best we can do is fix things on another level (read:
ebuild).

With the above paragraph in mind, perhaps we should just update the ebuild to
reflect that it can only run on a specific version of the kernel, in case old
ones break.

Anyway, I'll just go see if I can find where the breaker is...

(... hours later ...)

The EVMS sources say that everything is done via a call to ioctl(), so I'd
guess that the breakage is in the kernel device mapper driver.

The RedHat folks have helpfully declined GoogleBot access to the livdevmapper
commit archive at http://sources.redhat.com/ml/dm-cvs/, and the integrated
search function can't even find itself.

git.kernel.org is rather unhelpful too, requiring an exact kernel version be
given before it will search for a path or string.

Nabble seems to be my friend, though :-). It might have nailed something (with
a simple search from the front page no less):
http://www.nabble.com/-PATCH-03-25--dm-snapshot%3A-allow-zero-chunk_size-tf2274316.html#a6315352

The above patch is really old (sept 2006), but seems to apply to 2.6.18-rc7.
Odd.

Either way, the patch above says that the old version accepts anything with at
least 4 parameters! So applying the patch should be safe for old kernel
versions too - as long as it keeps a minimum of 4 parameters..

(Nasty patch by the way, it rips out code comments explaining more-or-less
doubtful logic in the code, leaving just the code to "explain".)

Phew. My apologies for writing a novel.

------- Comment #5 From Tiziano Müller 2007-10-27 11:12:04 0000 -------
Albert: Which kernel did you use before updating?

------- Comment #6 From rosenfield.albert@gmail.com 2007-10-29 18:36:03 0000 -------
kernel before: 2.6.16.18-xen

------- Comment #7 From rosenfield.albert@gmail.com 2007-10-30 13:05:29 0000 -------
devzero:
So, what have you decided?

------- Comment #8 From Tiziano Müller 2007-10-30 16:21:26 0000 -------
Well, I tested evms with gentoo-sources-2.6.16-r13 and EVMS didn't run at all
there (somehow the volumes didn't show up in /dev/evms), but there were no
particular errors about snapshotting.
I'll see that I push out revision bump until the end of the week including the
patch.
As a security measurement I'll add a warning if a running kernel before 2.6.19
is being detected.

------- Comment #9 From rosenfield.albert@gmail.com 2007-10-30 17:18:25 0000 -------
> (somehow the volumes didn't show up in /dev/evms)

The snapshot volumes, or every volume?
The snapshot volumes are unlinked by evms_activate when the dm table setup
fails.

(If it's every volume, perhaps something with the udev version)

> I'll see that I push out revision bump until the end of the week
> including the patch. As a security measurement I'll add a warning
> if a running kernel before 2.6.19 is being detected.

Beautiful...

(Can't wait to get hold of a new version; I just have this feeling that now
that backups are down something is going to happen that we wish we had 'em
;-)..)

------- Comment #10 From Tiziano Müller 2007-12-03 20:13:40 0000 -------
Finally fixed. Sorry for the delay.

First Last Prev Next    No search results available      Search page      Enter new bug