Hi,<div><br></div><div>Maybe onedb can't connect to the DB because some gems are missing. Let's try installing 'sequel' and 'sqlite3' gems.</div><div><br></div><div>Regards<br clear="all">--<br>Carlos Martín, MSc<br>
Project Engineer<br>OpenNebula - The Open-source Solution for Data Center Virtualization<div><span style="border-collapse:collapse;color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px"><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:cmartin@opennebula.org" target="_blank">cmartin@opennebula.org</a> | <a href="http://twitter.com/opennebula" target="_blank">@OpenNebula</a></span><span style="border-collapse:collapse;color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px"><a href="mailto:cmartin@opennebula.org" style="color:rgb(42,93,176)" target="_blank"></a></span></div>
<br>
<br><br><div class="gmail_quote">On Tue, Jul 24, 2012 at 4:17 AM, David <span dir="ltr"><<a href="mailto:david1228@foxmail.com" target="_blank">david1228@foxmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><div>Hi,</div>
<div>The output of execute command, as flollows:</div>
<div> </div>
<div>[oneadmin@vm-master~]$ sqlite3 /opt/nebula/ONE_2.2/var/one.db<br>SQLite version 3.5.9<br>Enter ".help" for instructions<br>sqlite> .tables<br>backup history image_pool user_pool <br>backupdisk host_pool leases vm_pool <br>
cluster_pool host_shares network_pool<br>sqlite> select * from user_pool where oid=0;<br>0|oneadmin|7bc8559a8fe509e680562b85c337f170956fcb06|1<br>sqlite> .schema<br>CREATE TABLE backup (oid INTEGER,vid INTEGER,bk_dir TEXT,state INTEGER,stime INTEGER,etime INTEGER,PRIMARY KEY(oid));<br>
CREATE TABLE backupdisk (oid INTEGER,vid INTEGER,dk_name TEXT,dk_dir TEXT,state INTEGER,PRIMARY KEY(oid));<br>CREATE TABLE cluster_pool (oid INTEGER PRIMARY KEY, cluster_name VARCHAR(128), UNIQUE(cluster_name) );<br>CREATE TABLE history (vid INTEGER,seq INTEGER,host_name TEXT,vm_dir TEXT,hid INTEGER,vm_mad TEXT,tm_mad TEXT,stime INTEGER,etime INTEGER,pstime INTEGER,petime INTEGER,rstime INTEGER,retime INTEGER,estime INTEGER,eetime INTEGER,reason INTEGER,PRIMARY KEY(vid,seq));<br>
CREATE TABLE host_pool (oid INTEGER PRIMARY KEY,host_name VARCHAR(256), state INTEGER,im_mad VARCHAR(128),vm_mad VARCHAR(128),tm_mad VARCHAR(128),last_mon_time INTEGER, cluster VARCHAR(128), template TEXT, UNIQUE(host_name));<br>
CREATE TABLE host_shares(hid INTEGER PRIMARY KEY,disk_usage INTEGER, mem_usage INTEGER, cpu_usage INTEGER,max_disk INTEGER, max_mem INTEGER, max_cpu INTEGER,free_disk INTEGER, free_mem INTEGER, free_cpu INTEGER,used_disk INTEGER, used_mem INTEGER, used_cpu INTEGER,running_vms INTEGER);<br>
CREATE TABLE image_pool (oid INTEGER PRIMARY KEY, uid INTEGER, name VARCHAR(128), type INTEGER, public INTEGER, persistent INTEGER, regtime INTEGER, source TEXT, state INTEGER, running_vms INTEGER, template TEXT, UNIQUE(name) );<br>
CREATE TABLE leases (oid INTEGER, ip BIGINT, mac_prefix BIGINT, mac_suffix BIGINT,vid INTEGER, used INTEGER, PRIMARY KEY(oid,ip));<br>CREATE TABLE network_pool (oid INTEGER PRIMARY KEY, uid INTEGER, name VARCHAR(256), type INTEGER, bridge TEXT, public INTEGER, template TEXT, UNIQUE(name));<br>
CREATE TABLE user_pool (oid INTEGER PRIMARY KEY, user_name VARCHAR(256), password TEXT,enabled INTEGER, UNIQUE(user_name));<br>CREATE TABLE vm_pool (oid INTEGER PRIMARY KEY,uid INTEGER,name TEXT,last_poll INTEGER, state INTEGER,lcm_state INTEGER,stime INTEGER,etime INTEGER,deploy_id TEXT,memory INTEGER,cpu INTEGER,net_tx INTEGER,net_rx INTEGER, last_seq INTEGER, template TEXT);<br>
sqlite> </div>
<div><u></u>
<div><br></div>
<div><br></div>
<div style="PADDING-BOTTOM:2px;PADDING-LEFT:0px;PADDING-RIGHT:0px;FONT-FAMILY:Arial Narrow;FONT-SIZE:12px;PADDING-TOP:2px">------------------ 原始邮件 ------------------</div>
<div style="PADDING-BOTTOM:8px;PADDING-LEFT:8px;PADDING-RIGHT:8px;BACKGROUND:#efefef;FONT-SIZE:12px;PADDING-TOP:8px">
<div><b>发件人:</b> "Carlos Martín Sánch"<<a href="mailto:cmartin@opennebula.org" target="_blank">cmartin@opennebula.org</a>>;</div>
<div><b>发送时间:</b> 2012年7月23日(星期一) 晚上6:17</div>
<div><b>收件人:</b> "David"<<a href="mailto:david1228@foxmail.com" target="_blank">david1228@foxmail.com</a>>; <u></u></div>
<div><b>抄送:</b> "users"<<a href="mailto:users@lists.opennebula.org" target="_blank">users@lists.opennebula.org</a>>; <u></u></div>
<div><b>主题:</b> Re: [one-users] problem with upgrading OpenNebula DB</div></div>
<div><br></div>Hi,
<div><br></div>
<div>Can you please paste the output of 'sqlite3 <span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">/opt/nebula/ONE_2.2/var/one.db ".schema"' ?</span></div>
<div><font color="#222222" face="arial, sans-serif"><br></font></div>
<div><font color="#222222" face="arial, sans-serif">Regards</font></div>
<div>--<br>Carlos Martín, MSc<br>Project Engineer<br>OpenNebula - The Open-source Solution for Data Center Virtualization
<div><span style="BORDER-COLLAPSE:collapse;FONT-FAMILY:arial,sans-serif;COLOR:rgb(136,136,136);FONT-SIZE:13px"><a href="http://www.opennebula.org/" target="_blank">www.OpenNebula.org</a> | <a href="mailto:cmartin@opennebula.org" target="_blank">cmartin@opennebula.org</a> | <a href="http://twitter.com/opennebula" target="_blank">@OpenNebula</a></span><span style="BORDER-COLLAPSE:collapse;FONT-FAMILY:arial,sans-serif;COLOR:rgb(136,136,136);FONT-SIZE:13px"><a style="COLOR:rgb(42,93,176)" href="mailto:cmartin@opennebula.org" target="_blank"></a></span></div>
<br><br><br>
<div class="gmail_quote">On Mon, Jul 23, 2012 at 11:48 AM, David <span dir="ltr"><<a href="mailto:david1228@foxmail.com" target="_blank">david1228@foxmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div>
<div>
<p>Hi,</p>
<p>While upgrading openNebula2.2(sqlite DB) to 3.2.1(mysql DB) :</p>
<p>$ onedb upgrade -v --sqlite /opt/nebula/ONE_2.2/var/one.db</p>
<p>I found a fault:"Database schema does not look to be created by OpenNebula: table user_pool is missing or empty."can you tell me how to solve it? thank you!</p>
<p>gem -v: 1.8.10</p>
<p>ruby -v : ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux] </p>
<p>Regards!</p></div></div><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.opennebula.org" target="_blank">Users@lists.opennebula.org</a><br><a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><br></div>
<div></div><u></u></div></div></div></blockquote></div><br></div>