Commit 2ef782c2 authored by Leigh Stoller's avatar Leigh Stoller

Redo the dump/load descriptor code, that is used to populate the

initiali set of descriptors on a new installation. Get rid of all that
crazy sql table stuff, and reuse web the backend scripts that take
small fragments of XML describing osinfos and images.
parent ad26f8d3
insert into temp_images set creator='elabman',default_osid='282',part4_osid=NULL,loadpart='1',shared='0',load_address='',imagename='FBSD410-IPFW2',pid='emulab-ops',ezid='0',updated=NULL,loadlength='1',imageid='869',magic=NULL,global='1',part1_osid='282',path='/usr/testbed/images/FBSD410-IPFW2.ndz',mbr_version='1',frisbee_pid='0',description='FreeBSD 4.10 with built-in IPFW2 support',load_busy='0',part3_osid=NULL,created='2008-07-22 17:34:07',access_key=NULL,old_imageid='emulab-ops-FBSD410-IPFW2',gid='emulab-ops',part2_osid=NULL;
insert into temp_images set creator='elabman',default_osid='285',part4_osid=NULL,loadpart='1',shared='0',load_address='',imagename='FBSD410-STD',pid='emulab-ops',ezid='1',updated=NULL,loadlength='1',imageid='285',magic=NULL,global='1',part1_osid='285',path='/usr/testbed/images/FBSD410-STD.ndz',mbr_version='1',frisbee_pid='0',description='Testbed version of FreeBSD 4.10',load_busy='0',part3_osid=NULL,created='2008-07-22 17:34:07',access_key=NULL,old_imageid='emulab-ops-FBSD410-STD',gid='emulab-ops',part2_osid=NULL;
insert into temp_images set creator='elabman',default_osid='940',part4_osid=NULL,loadpart='0',shared='0',load_address='',imagename='FBSD62+FC6-STD',pid='emulab-ops',ezid='0',updated=NULL,loadlength='4',imageid='947',magic=NULL,global='1',part1_osid='303',path='/usr/testbed/images/FBSD62+FC6-STD.ndz',mbr_version='1',frisbee_pid='0',description='FreeBSD 6.2 and Fedora Core 6 combo image',load_busy='0',part3_osid=NULL,created='2008-07-22 17:34:07',access_key='0f58499aa4e7280e7f95bf281b147a7c',old_imageid='',gid='emulab-ops',part2_osid='940';
insert into temp_images set creator='elabman',default_osid='303',part4_osid=NULL,loadpart='1',shared='0',load_address='',imagename='FBSD62-STD',pid='emulab-ops',ezid='1',updated=NULL,loadlength='1',imageid='303',magic=NULL,global='1',part1_osid='303',path='/usr/testbed/images/FBSD62-STD.ndz',mbr_version='1',frisbee_pid='0',description='FreeBSD 6.2 pre-release',load_busy='0',part3_osid=NULL,created='2008-07-22 17:34:07',access_key=NULL,old_imageid='emulab-ops-FBSD62-STD',gid='emulab-ops',part2_osid=NULL;
insert into temp_images set creator='elabman',default_osid='940',part4_osid=NULL,loadpart='2',shared='0',load_address='',imagename='FC6-STD',pid='emulab-ops',ezid='1',updated=NULL,loadlength='1',imageid='940',magic=NULL,global='1',part1_osid=NULL,path='/usr/testbed/images/FC6-STD.ndz',mbr_version='1',frisbee_pid='0',description='Emulab Standard Fedora Core 6 image.',load_busy='0',part3_osid=NULL,created='2008-07-22 17:34:07',access_key=NULL,old_imageid='',gid='emulab-ops',part2_osid='940';
insert into temp_os_info set mfs='0',creator='elabman',max_concurrent=NULL,osid='278',reboot_waittime='90',mustclean='0',shared='1',pid='emulab-ops',ezid='0',osname='FBSD-JAIL',old_osid='emulab-ops-FBSD-JAIL',OS='FreeBSD',magic='',old_nextosid='FBSD-STD',version='4.X',machinetype='',path=NULL,osfeatures='ping,ssh,isup,linktest',description='Generic OSID for jailed nodes',op_mode='PCVM',created='2008-07-22 17:34:08',nextosid='362';
insert into temp_os_info set mfs='0',creator='elabman',max_concurrent=NULL,osid='362',reboot_waittime='150',mustclean='1',shared='1',pid='emulab-ops',ezid='0',osname='FBSD-STD',old_osid='FBSD-STD',OS='FreeBSD',magic='FreeBSD',old_nextosid='MAP:osid_map',version='',machinetype='pc600',path=NULL,osfeatures='ping,ssh,ipod,isup,veths,mlinks,linktest,linkdelays',description='Any Version of FreeBSD',op_mode='NORMAL',created='2008-07-22 17:34:08',nextosid='303';
insert into temp_os_info set mfs='0',creator='elabman',max_concurrent=NULL,osid='282',reboot_waittime='150',mustclean='1',shared='1',pid='emulab-ops',ezid='1',osname='FBSD410-IPFW2',old_osid='emulab-ops-FBSD410-IPFW2',OS='FreeBSD',magic=NULL,old_nextosid='',version='4.10',machinetype='',path=NULL,osfeatures='ping,ssh,ipod,isup,veths,mlinks,linktest',description='FreeBSD 4.10 with IPFW2',op_mode='NORMALv2',created='2008-07-22 17:34:08',nextosid=NULL;
insert into temp_os_info set mfs='0',creator='elabman',max_concurrent=NULL,osid='285',reboot_waittime='150',mustclean='1',shared='1',pid='emulab-ops',ezid='1',osname='FBSD410-STD',old_osid='emulab-ops-FBSD410-STD',OS='FreeBSD',magic=NULL,old_nextosid='',version='4.10',machinetype='',path=NULL,osfeatures='ping,ssh,ipod,isup,veths,mlinks,linktest,linkdelays',description='Testbed version of FreeBSD 4.10',op_mode='NORMALv2',created='2008-07-22 17:34:08',nextosid=NULL;
insert into temp_os_info set mfs='0',creator='elabman',max_concurrent=NULL,osid='303',reboot_waittime='120',mustclean='1',shared='1',pid='emulab-ops',ezid='1',osname='FBSD62-STD',old_osid='emulab-ops-FBSD62-STD',OS='FreeBSD',magic=NULL,old_nextosid='',version='6.2',machinetype='',path=NULL,osfeatures='ping,ssh,ipod,isup,mlinks,linktest,linkdelays',description='FreeBSD 6.2 pre-release',op_mode='NORMALv2',created='2008-07-22 17:34:08',nextosid=NULL;
insert into temp_os_info set mfs='0',creator='elabman',max_concurrent=NULL,osid='940',reboot_waittime='120',mustclean='1',shared='1',pid='emulab-ops',ezid='1',osname='FC6-STD',old_osid='',OS='Fedora',magic=NULL,old_nextosid='',version='6',machinetype='',path=NULL,osfeatures='ping,ssh,ipod,isup,linktest',description='Emulab Standard Fedora Core 6 image.',op_mode='NORMALv2',created='2008-07-22 17:34:08',nextosid=NULL;
insert into temp_os_info set mfs='1',creator='elabman',max_concurrent=NULL,osid='399',reboot_waittime='150',mustclean='0',shared='1',pid='emulab-ops',ezid='0',osname='FREEBSD-MFS',old_osid='FREEBSD-MFS',OS='FreeBSD',magic=NULL,old_nextosid='',version='6.2',machinetype='',path='/tftpboot/freebsd',osfeatures='ping,ssh,ipod,isup',description='FreeBSD in an MFS',op_mode='PXEFBSD',created='2008-07-22 17:34:08',nextosid=NULL;
insert into temp_os_info set mfs='1',creator='elabman',max_concurrent=NULL,osid='403',reboot_waittime='150',mustclean='0',shared='1',pid='emulab-ops',ezid='0',osname='FRISBEE-MFS',old_osid='FRISBEE-MFS',OS='FreeBSD',magic=NULL,old_nextosid='',version='6.2',machinetype='',path='/tftpboot/frisbee',osfeatures='ping,ssh,ipod,isup',description='Frisbee (FreeBSD) in an MFS',op_mode='RELOAD',created='2008-07-22 17:34:08',nextosid=NULL;
insert into temp_os_info set mfs='0',creator='elabman',max_concurrent=NULL,osid='406',reboot_waittime='150',mustclean='1',shared='1',pid='emulab-ops',ezid='0',osname='FW-IPFW',old_osid='FW-IPFW',OS='FreeBSD',magic='FreeBSD',old_nextosid='emulab-ops-FBSD410-STD',version='',machinetype='',path=NULL,osfeatures='ping,ssh,ipod,isup,veths,mlinks',description='IPFW Firewall',op_mode='NORMAL',created='2008-07-22 17:34:08',nextosid='285';
insert into temp_os_info set mfs='0',creator='elabman',max_concurrent=NULL,osid='407',reboot_waittime='150',mustclean='1',shared='1',pid='emulab-ops',ezid='0',osname='FW-IPFW2',old_osid='FW-IPFW2',OS='FreeBSD',magic='FreeBSD',old_nextosid='emulab-ops-FBSD410-IPFW2',version='',machinetype='',path=NULL,osfeatures='ping,ssh,ipod,isup,veths,mlinks',description='IPFW2 Firewall',op_mode='NORMAL',created='2008-07-22 17:34:08',nextosid='282';
insert into temp_os_info set mfs='1',creator='elabman',max_concurrent=NULL,osid='467',reboot_waittime='150',mustclean='0',shared='1',pid='emulab-ops',ezid='0',osname='NEWNODE-MFS',old_osid='NEWNODE-MFS',OS='FreeBSD',magic=NULL,old_nextosid='',version='6.2',machinetype='',path='/tftpboot/freebsd.newnode',osfeatures='ping,ssh,ipod,isup',description='NewNode (FreeBSD) in an MFS',op_mode='PXEFBSD',created='2008-07-22 17:34:08',nextosid=NULL;
insert into temp_os_info set mfs='1',creator='elabman',max_concurrent=NULL,osid='470',reboot_waittime='150',mustclean='0',shared='1',pid='emulab-ops',ezid='0',osname='OPSNODE-BSD',old_osid='OPSNODE-BSD',OS='FreeBSD',magic=NULL,old_nextosid='',version='4.X',machinetype='',path='',osfeatures='ping,ssh,ipod,isup',description='FreeBSD on the Operations Node',op_mode='OPSNODEBSD',created='2008-07-22 17:34:08',nextosid=NULL;
insert into temp_os_info set mfs='0',creator='elabman',max_concurrent=NULL,osid='324',reboot_waittime='60',mustclean='1',shared='0',pid='emulab-ops',ezid='0',osname='POWER-CONTROLLER',old_osid='emulab-ops-POWER-CONTROLLER',OS='Other',magic='',old_nextosid='',version='0.00',machinetype='',path=NULL,osfeatures='',description='Stub descriptor for power controllers of any kind',op_mode='ALWAYSUP',created='2008-07-22 17:34:08',nextosid=NULL;
insert into temp_os_info set mfs='0',creator='elabman',max_concurrent=NULL,osid='526',reboot_waittime='150',mustclean='1',shared='1',pid='emulab-ops',ezid='0',osname='RHL-STD',old_osid='RHL-STD',OS='Linux',magic='Linux',old_nextosid='MAP:osid_map',version='',machinetype='pc600',path=NULL,osfeatures='ping,ssh,ipod,isup,linktest,linkdelays',description='Any of RedHat Linux',op_mode='NORMAL',created='2008-07-22 17:34:08',nextosid='940';
insert into temp_images set creator='elabman',default_osid='285',part4_osid=NULL,loadpart='0',shared='0',load_address='',imagename='FBSD410+RHL90-STD',pid='emulab-ops',ezid='0',updated=NULL,loadlength='4',imageid='864',magic=NULL,global='1',part1_osid='285',path='/usr/testbed/images/FBSD410+RHL90-STD.ndz',mbr_version='1',frisbee_pid='0',description='FreeBSD 4.10 and RedHat 9.0',load_busy='0',part3_osid=NULL,created='2008-07-22 17:42:23',access_key=NULL,old_imageid='emulab-ops-FBSD410+RHL90-STD',gid='emulab-ops',part2_osid='336';
insert into temp_images set creator='elabman',default_osid='282',part4_osid=NULL,loadpart='1',shared='0',load_address='',imagename='FBSD410-IPFW2',pid='emulab-ops',ezid='0',updated=NULL,loadlength='1',imageid='869',magic=NULL,global='1',part1_osid='282',path='/usr/testbed/images/FBSD410-IPFW2.ndz',mbr_version='1',frisbee_pid='0',description='FreeBSD 4.10 with built-in IPFW2 support',load_busy='0',part3_osid=NULL,created='2008-07-22 17:42:23',access_key=NULL,old_imageid='emulab-ops-FBSD410-IPFW2',gid='emulab-ops',part2_osid=NULL;
insert into temp_images set creator='elabman',default_osid='285',part4_osid=NULL,loadpart='1',shared='0',load_address='',imagename='FBSD410-STD',pid='emulab-ops',ezid='1',updated=NULL,loadlength='1',imageid='285',magic=NULL,global='1',part1_osid='285',path='/usr/testbed/images/FBSD410-STD.ndz',mbr_version='1',frisbee_pid='0',description='Testbed version of FreeBSD 4.10',load_busy='0',part3_osid=NULL,created='2008-07-22 17:42:23',access_key=NULL,old_imageid='emulab-ops-FBSD410-STD',gid='emulab-ops',part2_osid=NULL;
insert into temp_images set creator='elabman',default_osid='336',part4_osid=NULL,loadpart='2',shared='0',load_address='',imagename='RHL90-STD',pid='emulab-ops',ezid='0',updated=NULL,loadlength='1',imageid='865',magic=NULL,global='1',part1_osid=NULL,path='/usr/testbed/images/RHL90-STD.ndz',mbr_version='1',frisbee_pid='0',description='Redhat 9.0 slice disk image',load_busy='0',part3_osid=NULL,created='2008-07-22 17:42:23',access_key=NULL,old_imageid='emulab-ops-RHL90-STD',gid='emulab-ops',part2_osid='336';
insert into temp_os_info set mfs='0',creator='elabman',max_concurrent=NULL,osid='278',reboot_waittime='90',mustclean='0',shared='1',pid='emulab-ops',ezid='0',osname='FBSD-JAIL',old_osid='emulab-ops-FBSD-JAIL',OS='FreeBSD',magic='',old_nextosid='FBSD-STD',version='4.X',machinetype='',path=NULL,osfeatures='ping,ssh,isup,linktest',description='Generic OSID for jailed nodes',op_mode='PCVM',created='2008-07-22 17:42:23',nextosid='362';
insert into temp_os_info set mfs='0',creator='elabman',max_concurrent=NULL,osid='362',reboot_waittime='150',mustclean='1',shared='1',pid='emulab-ops',ezid='0',osname='FBSD-STD',old_osid='FBSD-STD',OS='FreeBSD',magic='FreeBSD',old_nextosid='MAP:osid_map',version='',machinetype='pc600',path=NULL,osfeatures='ping,ssh,ipod,isup,veths,mlinks,linktest,linkdelays',description='Any Version of FreeBSD',op_mode='NORMAL',created='2008-07-22 17:42:23',nextosid='285';
insert into temp_os_info set mfs='0',creator='elabman',max_concurrent=NULL,osid='282',reboot_waittime='150',mustclean='1',shared='1',pid='emulab-ops',ezid='1',osname='FBSD410-IPFW2',old_osid='emulab-ops-FBSD410-IPFW2',OS='FreeBSD',magic=NULL,old_nextosid='',version='4.10',machinetype='',path=NULL,osfeatures='ping,ssh,ipod,isup,veths,mlinks,linktest',description='FreeBSD 4.10 with IPFW2',op_mode='NORMALv2',created='2008-07-22 17:42:23',nextosid=NULL;
insert into temp_os_info set mfs='0',creator='elabman',max_concurrent=NULL,osid='285',reboot_waittime='150',mustclean='1',shared='1',pid='emulab-ops',ezid='1',osname='FBSD410-STD',old_osid='emulab-ops-FBSD410-STD',OS='FreeBSD',magic=NULL,old_nextosid='',version='4.10',machinetype='',path=NULL,osfeatures='ping,ssh,ipod,isup,veths,mlinks,linktest,linkdelays',description='Testbed version of FreeBSD 4.10',op_mode='NORMALv2',created='2008-07-22 17:42:23',nextosid=NULL;
insert into temp_os_info set mfs='1',creator='elabman',max_concurrent=NULL,osid='399',reboot_waittime='150',mustclean='0',shared='1',pid='emulab-ops',ezid='0',osname='FREEBSD-MFS',old_osid='FREEBSD-MFS',OS='FreeBSD',magic=NULL,old_nextosid='',version='6.2',machinetype='',path='/tftpboot/freebsd',osfeatures='ping,ssh,ipod,isup',description='FreeBSD in an MFS',op_mode='PXEFBSD',created='2008-07-22 17:42:23',nextosid=NULL;
insert into temp_os_info set mfs='1',creator='elabman',max_concurrent=NULL,osid='403',reboot_waittime='150',mustclean='0',shared='1',pid='emulab-ops',ezid='0',osname='FRISBEE-MFS',old_osid='FRISBEE-MFS',OS='FreeBSD',magic=NULL,old_nextosid='',version='6.2',machinetype='',path='/tftpboot/frisbee',osfeatures='ping,ssh,ipod,isup',description='Frisbee (FreeBSD) in an MFS',op_mode='RELOAD',created='2008-07-22 17:42:23',nextosid=NULL;
insert into temp_os_info set mfs='0',creator='elabman',max_concurrent=NULL,osid='406',reboot_waittime='150',mustclean='1',shared='1',pid='emulab-ops',ezid='0',osname='FW-IPFW',old_osid='FW-IPFW',OS='FreeBSD',magic='FreeBSD',old_nextosid='emulab-ops-FBSD410-STD',version='',machinetype='',path=NULL,osfeatures='ping,ssh,ipod,isup,veths,mlinks',description='IPFW Firewall',op_mode='NORMAL',created='2008-07-22 17:42:23',nextosid='285';
insert into temp_os_info set mfs='0',creator='elabman',max_concurrent=NULL,osid='407',reboot_waittime='150',mustclean='1',shared='1',pid='emulab-ops',ezid='0',osname='FW-IPFW2',old_osid='FW-IPFW2',OS='FreeBSD',magic='FreeBSD',old_nextosid='emulab-ops-FBSD410-IPFW2',version='',machinetype='',path=NULL,osfeatures='ping,ssh,ipod,isup,veths,mlinks',description='IPFW2 Firewall',op_mode='NORMAL',created='2008-07-22 17:42:23',nextosid='282';
insert into temp_os_info set mfs='1',creator='elabman',max_concurrent=NULL,osid='467',reboot_waittime='150',mustclean='0',shared='1',pid='emulab-ops',ezid='0',osname='NEWNODE-MFS',old_osid='NEWNODE-MFS',OS='FreeBSD',magic=NULL,old_nextosid='',version='6.2',machinetype='',path='/tftpboot/freebsd.newnode',osfeatures='ping,ssh,ipod,isup',description='NewNode (FreeBSD) in an MFS',op_mode='PXEFBSD',created='2008-07-22 17:42:23',nextosid=NULL;
insert into temp_os_info set mfs='1',creator='elabman',max_concurrent=NULL,osid='470',reboot_waittime='150',mustclean='0',shared='1',pid='emulab-ops',ezid='0',osname='OPSNODE-BSD',old_osid='OPSNODE-BSD',OS='FreeBSD',magic=NULL,old_nextosid='',version='4.X',machinetype='',path='',osfeatures='ping,ssh,ipod,isup',description='FreeBSD on the Operations Node',op_mode='OPSNODEBSD',created='2008-07-22 17:42:23',nextosid=NULL;
insert into temp_os_info set mfs='0',creator='elabman',max_concurrent=NULL,osid='324',reboot_waittime='60',mustclean='1',shared='0',pid='emulab-ops',ezid='0',osname='POWER-CONTROLLER',old_osid='emulab-ops-POWER-CONTROLLER',OS='Other',magic='',old_nextosid='',version='0.00',machinetype='',path=NULL,osfeatures='',description='Stub descriptor for power controllers of any kind',op_mode='ALWAYSUP',created='2008-07-22 17:42:23',nextosid=NULL;
insert into temp_os_info set mfs='0',creator='elabman',max_concurrent=NULL,osid='526',reboot_waittime='150',mustclean='1',shared='1',pid='emulab-ops',ezid='0',osname='RHL-STD',old_osid='RHL-STD',OS='Linux',magic='Linux',old_nextosid='MAP:osid_map',version='',machinetype='pc600',path=NULL,osfeatures='ping,ssh,ipod,isup,linktest,linkdelays',description='Any of RedHat Linux',op_mode='NORMAL',created='2008-07-22 17:42:23',nextosid='336';
insert into temp_os_info set mfs='0',creator='elabman',max_concurrent=NULL,osid='336',reboot_waittime='150',mustclean='1',shared='1',pid='emulab-ops',ezid='0',osname='RHL90-STD',old_osid='emulab-ops-RHL90-STD',OS='Linux',magic='',old_nextosid='',version='9.0',machinetype='',path=NULL,osfeatures='ping,ssh,ipod,isup,linktest,linkdelays',description='Testbed version of RedHat Linux 9.0',op_mode='NORMALv2',created='2008-07-22 17:42:23',nextosid=NULL;
<descriptors>
<mapping name="RHL-STD">
<value>FC6-STD</value>
</mapping>
<mapping name="FBSD-STD">
<value>FBSD62-STD</value>
</mapping>
<osid>
<attribute name="features">
<value>ping,ssh,ipod,isup</value>
</attribute>
<attribute name="version">
<value>6.2</value>
</attribute>
<attribute name="path">
<value>boss:/tftpboot/frisbee</value>
</attribute>
<attribute name="reboot_waittime">
<value>150</value>
</attribute>
<attribute name="description">
<value>Frisbee (FreeBSD) in an MFS</value>
</attribute>
<attribute name="mustclean">
<value>0</value>
</attribute>
<attribute name="shared">
<value>1</value>
</attribute>
<attribute name="op_mode">
<value>RELOAD</value>
</attribute>
<attribute name="pid">
<value>emulab-ops</value>
</attribute>
<attribute name="osname">
<value>FRISBEE-MFS</value>
</attribute>
<attribute name="OS">
<value>FreeBSD</value>
</attribute>
</osid>
<osid>
<attribute name="features">
<value>ping,ssh,ipod,isup</value>
</attribute>
<attribute name="version">
<value>4.X</value>
</attribute>
<attribute name="reboot_waittime">
<value>150</value>
</attribute>
<attribute name="description">
<value>FreeBSD on the Operations Node</value>
</attribute>
<attribute name="mustclean">
<value>0</value>
</attribute>
<attribute name="op_mode">
<value>OPSNODEBSD</value>
</attribute>
<attribute name="shared">
<value>1</value>
</attribute>
<attribute name="pid">
<value>emulab-ops</value>
</attribute>
<attribute name="osname">
<value>OPSNODE-BSD</value>
</attribute>
<attribute name="OS">
<value>FreeBSD</value>
</attribute>
</osid>
<osid>
<attribute name="magic">
<value>FreeBSD</value>
</attribute>
<attribute name="features">
<value>ping,ssh,ipod,isup,veths,veth-ne,veth-en,mlinks,vlans</value>
</attribute>
<attribute name="reboot_waittime">
<value>150</value>
</attribute>
<attribute name="description">
<value>IPFW Firewall</value>
</attribute>
<attribute name="mustclean">
<value>1</value>
</attribute>
<attribute name="op_mode">
<value>NORMAL</value>
</attribute>
<attribute name="shared">
<value>1</value>
</attribute>
<attribute name="pid">
<value>emulab-ops</value>
</attribute>
<attribute name="osname">
<value>FW-IPFW</value>
</attribute>
<attribute name="OS">
<value>FreeBSD</value>
</attribute>
<attribute name="nextosid">
<value>emulab-ops,FBSD410-STD</value>
</attribute>
</osid>
<osid>
<attribute name="magic">
<value>FreeBSD</value>
</attribute>
<attribute name="features">
<value>ping,ssh,ipod,isup,veths,veth-ne,veth-en,mlinks,vlans</value>
</attribute>
<attribute name="reboot_waittime">
<value>150</value>
</attribute>
<attribute name="description">
<value>IPFW2 Firewall</value>
</attribute>
<attribute name="mustclean">
<value>1</value>
</attribute>
<attribute name="op_mode">
<value>NORMAL</value>
</attribute>
<attribute name="shared">
<value>1</value>
</attribute>
<attribute name="pid">
<value>emulab-ops</value>
</attribute>
<attribute name="osname">
<value>FW-IPFW2</value>
</attribute>
<attribute name="OS">
<value>FreeBSD</value>
</attribute>
<attribute name="nextosid">
<value>emulab-ops,FBSD410-STD</value>
</attribute>
</osid>
<osid>
<attribute name="magic">
<value></value>
</attribute>
<attribute name="version">
<value>0.00</value>
</attribute>
<attribute name="reboot_waittime">
<value>60</value>
</attribute>
<attribute name="description">
<value>Stub descriptor for power controllers of any kind</value>
</attribute>
<attribute name="mustclean">
<value>1</value>
</attribute>
<attribute name="op_mode">
<value>ALWAYSUP</value>
</attribute>
<attribute name="shared">
<value>0</value>
</attribute>
<attribute name="pid">
<value>emulab-ops</value>
</attribute>
<attribute name="osname">
<value>POWER-CONTROLLER</value>
</attribute>
<attribute name="OS">
<value>Other</value>
</attribute>
</osid>
<osid>
<attribute name="magic">
<value>FreeBSD</value>
</attribute>
<attribute name="features">
<value>ping,ssh,ipod,isup,veths,veth-ne,veth-en,mlinks,linktest,linkdelays,vlans</value>
</attribute>
<attribute name="reboot_waittime">
<value>150</value>
</attribute>
<attribute name="description">
<value>Any Version of FreeBSD</value>
</attribute>
<attribute name="mustclean">
<value>1</value>
</attribute>
<attribute name="op_mode">
<value>NORMAL</value>
</attribute>
<attribute name="shared">
<value>1</value>
</attribute>
<attribute name="pid">
<value>emulab-ops</value>
</attribute>
<attribute name="osname">
<value>FBSD-STD</value>
</attribute>
<attribute name="OS">
<value>FreeBSD</value>
</attribute>
</osid>
<osid>
<attribute name="features">
<value>ping,ssh,ipod,isup</value>
</attribute>
<attribute name="version">
<value>6.2</value>
</attribute>
<attribute name="path">
<value>boss:/tftpboot/freebsd.newnode</value>
</attribute>
<attribute name="reboot_waittime">
<value>150</value>
</attribute>
<attribute name="description">
<value>NewNode (FreeBSD) in an MFS</value>
</attribute>
<attribute name="mustclean">
<value>0</value>
</attribute>
<attribute name="shared">
<value>1</value>
</attribute>
<attribute name="op_mode">
<value>PXEFBSD</value>
</attribute>
<attribute name="pid">
<value>emulab-ops</value>
</attribute>
<attribute name="osname">
<value>NEWNODE-MFS</value>
</attribute>
<attribute name="OS">
<value>FreeBSD</value>
</attribute>
</osid>
<osid>
<attribute name="magic">
<value></value>
</attribute>
<attribute name="features">
<value>ping,ssh,isup,linktest</value>
</attribute>
<attribute name="version">
<value>4.X</value>
</attribute>
<attribute name="reboot_waittime">
<value>90</value>
</attribute>
<attribute name="description">
<value>Generic OSID for jailed nodes</value>
</attribute>
<attribute name="mustclean">
<value>0</value>
</attribute>
<attribute name="shared">
<value>1</value>
</attribute>
<attribute name="op_mode">
<value>PCVM</value>
</attribute>
<attribute name="pid">
<value>emulab-ops</value>
</attribute>
<attribute name="osname">
<value>FBSD-JAIL</value>
</attribute>
<attribute name="OS">
<value>FreeBSD</value>
</attribute>
<attribute name="nextosid">
<value>emulab-ops,FBSD-STD</value>
</attribute>
</osid>
<osid>
<attribute name="magic">
<value>Linux</value>
</attribute>
<attribute name="features">
<value>ping,ssh,ipod,isup,linktest,linkdelays,vlans</value>
</attribute>
<attribute name="reboot_waittime">
<value>150</value>
</attribute>
<attribute name="description">
<value>Any of RedHat Linux</value>
</attribute>
<attribute name="mustclean">
<value>1</value>
</attribute>
<attribute name="op_mode">
<value>NORMAL</value>
</attribute>
<attribute name="shared">
<value>1</value>
</attribute>
<attribute name="pid">
<value>emulab-ops</value>
</attribute>
<attribute name="osname">
<value>RHL-STD</value>
</attribute>
<attribute name="OS">
<value>Linux</value>
</attribute>
</osid>
<osid>
<attribute name="features">
<value>ping,ssh,ipod,isup</value>
</attribute>
<attribute name="version">
<value>6.2</value>
</attribute>
<attribute name="path">
<value>boss:/tftpboot/freebsd</value>
</attribute>
<attribute name="reboot_waittime">
<value>150</value>
</attribute>
<attribute name="description">
<value>FreeBSD in an MFS</value>
</attribute>
<attribute name="mustclean">
<value>0</value>
</attribute>
<attribute name="shared">
<value>1</value>
</attribute>
<attribute name="op_mode">
<value>PXEFBSD</value>
</attribute>
<attribute name="pid">
<value>emulab-ops</value>
</attribute>
<attribute name="osname">
<value>FREEBSD-MFS</value>
</attribute>
<attribute name="OS">
<value>FreeBSD</value>
</attribute>
</osid>
<image>
<attribute name="global">
<value>1</value>
</attribute>
<attribute name="part1_osid">
<value>emulab-ops,FBSD62-STD</value>
</attribute>
<attribute name="default_osid">
<value>emulab-ops,FC6-STD</value>
</attribute>
<attribute name="part4_osid">
<value>none</value>
</attribute>
<attribute name="path">
<value>/usr/testbed/images/FBSD62+FC6-STD.ndz</value>
</attribute>
<attribute name="loadpart">
<value>0</value>
</attribute>
<attribute name="description">
<value>FreeBSD 6.2 and Fedora Core 6 combo image</value>
</attribute>
<attribute name="part3_osid">
<value>none</value>
</attribute>
<attribute name="shared">
<value>0</value>
</attribute>
<attribute name="imagename">
<value>FBSD62+FC6-STD</value>
</attribute>
<attribute name="pid">
<value>emulab-ops</value>
</attribute>
<attribute name="loadlength">
<value>4</value>
</attribute>
<attribute name="part2_osid">
<value>emulab-ops,FC6-STD</value>
</attribute>
<attribute name="gid">
<value>emulab-ops</value>
</attribute>
</image>
<image>
<attribute name="global">
<value>1</value>
</attribute>
<attribute name="version">
<value>6.2</value>
</attribute>
<attribute name="osfeatures">
<value>ping,ssh,ipod,isup,mlinks,linktest,linkdelays</value>
</attribute>
<attribute name="path">
<value>/usr/testbed/images/FBSD62-STD.ndz</value>
</attribute>
<attribute name="reboot_waittime">
<value>120</value>
</attribute>
<attribute name="loadpart">
<value>1</value>
</attribute>
<attribute name="description">
<value>FreeBSD 6.2 pre-release</value>
</attribute>
<attribute name="op_mode">
<value>NORMALv2</value>
</attribute>
<attribute name="shared">
<value>0</value>
</attribute>
<attribute name="imagename">
<value>FBSD62-STD</value>
</attribute>
<attribute name="pid">
<value>emulab-ops</value>
</attribute>
<attribute name="OS">
<value>FreeBSD</value>
</attribute>
<attribute name="gid">
<value>emulab-ops</value>
</attribute>
</image>
<image>
<attribute name="global">
<value>1</value>
</attribute>
<attribute name="part1_osid">
<value>emulab-ops,FBSD410-IPFW2</value>
</attribute>
<attribute name="default_osid">
<value>emulab-ops,FBSD410-IPFW2</value>
</attribute>
<attribute name="part4_osid">
<value>none</value>
</attribute>
<attribute name="path">
<value>/usr/testbed/images/FBSD410-IPFW2.ndz</value>
</attribute>
<attribute name="loadpart">
<value>1</value>
</attribute>
<attribute name="description">
<value>FreeBSD 4.10 with built-in IPFW2 support</value>
</attribute>
<attribute name="part3_osid">
<value>none</value>
</attribute>
<attribute name="shared">
<value>0</value>
</attribute>
<attribute name="imagename">
<value>FBSD410-IPFW2</value>
</attribute>
<attribute name="pid">
<value>emulab-ops</value>
</attribute>
<attribute name="loadlength">
<value>1</value>
</attribute>
<attribute name="part2_osid">
<value>none</value>
</attribute>
<attribute name="gid">
<value>emulab-ops</value>
</attribute>
</image>
<image>
<attribute name="global">
<value>1</value>
</attribute>
<attribute name="version">
<value>6</value>
</attribute>
<attribute name="osfeatures">
<value>ping,ssh,ipod,isup,linktest</value>
</attribute>
<attribute name="path">
<value>/usr/testbed/images/FC6-STD.ndz</value>
</attribute>
<attribute name="reboot_waittime">
<value>120</value>
</attribute>
<attribute name="loadpart">
<value>2</value>
</attribute>
<attribute name="description">
<value>Emulab Standard Fedora Core 6 image.</value>
</attribute>
<attribute name="op_mode">
<value>NORMALv2</value>
</attribute>
<attribute name="shared">
<value>0</value>
</attribute>
<attribute name="imagename">
<value>FC6-STD</value>
</attribute>
<attribute name="pid">
<value>emulab-ops</value>
</attribute>
<attribute name="OS">
<value>Fedora</value>
</attribute>
<attribute name="gid">
<value>emulab-ops</value>
</attribute>
</image>
<image>
<attribute name="global">
<value>1</value>
</attribute>
<attribute name="version">
<value>4.10</value>
</attribute>
<attribute name="osfeatures">
<value>ping,ssh,ipod,isup,veths,veth-ne,veth-en,mlinks,linktest,linkdelays,vlans</value>
</attribute>
<attribute name="path">
<value>/usr/testbed/images/FBSD410-STD.ndz</value>
</attribute>
<attribute name="reboot_waittime">
<value>150</value>
</attribute>
<attribute name="loadpart">
<value>1</value>
</attribute>
<attribute name="description">
<value>Testbed version of FreeBSD 4.10</value>
</attribute>
<attribute name="op_mode">
<value>NORMALv2</value>
</attribute>
<attribute name="shared">
<value>0</value>
</attribute>
<attribute name="imagename">
<value>FBSD410-STD</value>
</attribute>
<attribute name="pid">
<value>emulab-ops</value>
</attribute>
<attribute name="OS">
<value>FreeBSD</value>
</attribute>
<attribute name="gid">
<value>emulab-ops</value>
</attribute>
</image>
</descriptors>
#!/usr/bin/perl -w #!/usr/bin/perl -w
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2007, 2008 University of Utah and the Flux Group. # Copyright (c) 2007-2010 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
use English; use English;
...@@ -66,7 +66,7 @@ my $TB = "@prefix@"; ...@@ -66,7 +66,7 @@ my $TB = "@prefix@";
my $TBOPS = "@TBOPSEMAIL@"; my $TBOPS = "@TBOPSEMAIL@";
my $TBLOGS = "@TBLOGSEMAIL@"; my $TBLOGS = "@TBLOGSEMAIL@";
my $BOSSNODE = "@BOSSNODE@"; my $BOSSNODE = "@BOSSNODE@";
my $TFTPDIR = "/tftpboot"; my $DUMPDESC = "$TB/sbin/dumpdescriptor";
# #
# Testbed Support libraries # Testbed Support libraries
...@@ -74,11 +74,14 @@ my $TFTPDIR = "/tftpboot"; ...@@ -74,11 +74,14 @@ my $TFTPDIR = "/tftpboot";
use lib "@prefix@/lib"; use lib "@prefix@/lib";
use libdb; use libdb;
use libtestbed; use libtestbed;
use Image;
use OSinfo;
# Locals # Locals
my %tempkeys = (); my %tempkeys = ();
my $protouser = "elabman"; my $protouser = "elabman";
my $protoproj = TBOPSPID(); my $protoproj = TBOPSPID();
sub fatal($);
# #
# Turn off line buffering on output # Turn off line buffering on output
...@@ -111,157 +114,103 @@ usage() ...@@ -111,157 +114,103 @@ usage()
if (@ARGV != 1); if (@ARGV != 1);
my $filename = $ARGV[0]; my $filename = $ARGV[0];
# my %images = ();
# Open tempfile. my %osinfos = ();
#
open(OUTPUT, ">$filename") or
die("Could not open $filename for writing!\n");
#
# Create some temporary tables to mirror the existing tables. We
# populate these tables then spit them out. On the other side, when we
# load this table, we will move the rows out and into the local table,
# after adjustment.
#
#
# The images table.
#
DBQueryFatal("create temporary table temp_images like images");
DBQueryFatal("insert into temp_images ".
"select * from images where pid='$protoproj' and (".
join(" or ", map("imagename='$_'", @{$imagenames{$version}})) . ")");
my $query_result = DBQueryFatal("show create table temp_images");
my $create_string = ($query_result->fetchrow_array())[1];
#
# Kill the idx slots; they may not be valid on the remote testbeds, and
# it simplifies backwards compatability.
#
DBQueryFatal("alter table temp_images ".
"drop pid_idx, drop gid_idx, drop creator_idx, drop uuid");
# #
# Before we dump the table contents, reset a few things. # Gather up the images and any osinfos they reference.
# #
DBQueryFatal("update temp_images set ". foreach my $imagename (@{$imagenames{$version}}) {
"creator='$protouser', ". my $image = Image->Lookup("$protoproj,$imagename");
"pid='$protoproj', gid='$protoproj', ".