Igor Lvovsky has posted comments on this change.
Change subject: vm payload: add file injection to vm
......................................................................
Patch Set 1: I would prefer that you didn't submit this
(15 inline comments)
Several general questions:
1. Could be same 'payload' used by several VM's?
If answer is 'yes', maybe we need to create file with
vmID 'prefix'/'trailer' in the name.
2. Is this survive migration and vdsm restart ?
3. Can you remember ne what we decided about reporting
back to rhev-M this huge payload data ?
....................................................
Commit Message
Line 10: user can send file content and have them in the vm in floppy of iso
floppy (.vmf) or cdrom (.iso)
....................................................
File vdsm/supervdsmServer.py
Line 40: import constants
Ah, I think we want to avoid import constants here. Ask Dan/Saggi.
Line 46: PAYLOAD_PREFIX_PATH = '/var/run/vdsm/payload/'
Why you called it xxx_PREFIX_xxx ?
Line 186: def _commonMkFs(self, files):
I am not a 'naming' police, but you just create a file here. Why xxxMkFs ?
Line 194: for name in entry.iterkeys():
hmmml, maybe I am missing something. Can you please explain me how is 'files'
looks like ?
Line 199: os.chown(filename, uid, gid)
grrr, trailing space
Line 205: def _commonCleanFs(self, files, dirname, media):
Again, I think a name a little misleading
Line 208: os.chown(media, uid, gid)
Why you need chown here? you already did it during creation
Line 224: code %s, out %s\nerr %s" % (str(rc), out, err))
Dan worked hard to clean all str() from the code.
Line 231: code %s, out %s\nerr %s" % (str(rc), out, err))
str() is redundant
Line 240: code %s, out %s\nerr %s" % (str(rc), out, err))
str() is redundant
Line 255: code %s, out %s\nerr %s" % (str(rc), out, err))
str() is redundant
....................................................
File vdsm/vm.py
Line 431: if self.conf.has_key('vmPayload'):
I don't like this global key. You can create particular device with specParams
"vmPaylod".
Line 437: drv['iface'] = 'ide'
This maybe a problem.
1. You can't be sure that you have empty ide slot (in case you already have 4 ide
devices)
2. Floppy disk not ide at all.
Line 438: for key, files in self.conf.get('vmPayload'):
What is files here? Can you plese explain what you want to pass here?
--
To view, visit
http://gerrit.ovirt.org/2321
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I256475342c79690a95ad999335522f99714cdc8b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi(a)redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky(a)redhat.com>