Commit adb428d4 authored by Leigh B Stoller's avatar Leigh B Stoller

Add 'vnode_id' column to 'reserved_blockstores' table. This is so

we can determine precisely what blockstore is reserved under the
name of the pcvm. For each blockstore, there is a pseudo pcvm node
for it. Mostly this is for nfree, so that we can safely release a
a node and have the accounting done properly.
parent b6b39926
......@@ -3646,6 +3646,7 @@ CREATE TABLE `reserved_blockstores` (
`eid` varchar(32) NOT NULL default '',
`exptidx` int(11) NOT NULL default '0',
`size` int(10) unsigned NOT NULL default '0',
`vnode_id` varchar(32) NOT NULL default '',
`rsrv_time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`exptidx`,`bsidx`,`vname`),
UNIQUE KEY `vname` (`exptidx`,`vname`),
......
#
# Add 'vnode_id' column to 'reserved_blockstores' table. This is so
# we can determine precisely what blockstore is reserved under the
# name of the pcvm. For each blockstore, there is a pseudo pcvm node
# for it. Mostly this is for nfree, so that we can safely release a
# a node and have the accounting done properly.
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("reserved_blockstores", "vnode_id")) {
DBQueryFatal("alter table reserved_blockstores add ".
" `vnode_id` varchar(32) NOT NULL default '' ".
" after size");
}
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment