[Engine-devel] Problem with detachment of host interface using ovirt-sdk
by Itzik Brown
--_000_4488206DC085244C886DBC9E7038B68918D382CEMTRDAG01mtlcom_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi,
I'm using ovirt-sdk to attach and detach a network to a host's Interface.
Once the network is attached to the interface I try to detach the network f=
rom the interface using the following steps:
1.Detach the network from the cluster through the GUI.
2.Remove the network from the datacenter through the GUI.
3.Detach the network from the host's interface using the SDK:
nic =3D api.hosts.get(name=3Dhost).nics.get(name=3Dif_name)
net =3D params.Network(name=3Dnet_name)
act =3D params.Action(network=3Dnet)
nic.detach(act)
api.hosts.get(name=3Dhost).commitnetconfig()
Then I get the error:
http://pastebin.com/3Md07huE
The same flow using the GUI works fine.
Network removal from the Datacenter is a trigger for me to run the detachme=
nt operation therefore I use this flow.
I use the following components:
rhevm-3.0.2_0001-2
ovirt-sdk (Using the latest from git repository)
Please advise how to proceed.
Thanks,
Itzik
--_000_4488206DC085244C886DBC9E7038B68918D382CEMTRDAG01mtlcom_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Courrier New";
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:right;
direction:rtl;
unicode-bidi:embed;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"blue" vlink=3D"purple">
<div class=3D"WordSection1">
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed">Hi,<o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed"><o:p> </o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed">I'm using ovirt-sdk to attach and detach a network to a host's Inter=
face.<o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed">Once the network is attached to the interface I try to detach the ne=
twork from the interface using the following steps:<span lang=3D"HE" dir=3D=
"RTL" style=3D"font-family:"Arial","sans-serif""><o:p><=
/o:p></span></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed"><o:p> </o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed">1.Detach the network from the cluster through the GUI.<o:p></o:p></p=
>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed">2.Remove the network from the datacenter through the GUI.<o:p></o:p>=
</p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed">3.Detach the network from the host's interface using the SDK:<o:p></=
o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed"><o:p> </o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;text-autospace:none;directi=
on:ltr;unicode-bidi:embed">
<span style=3D"font-size:10.0pt;font-family:"Courrier New"">nic =
=3D api.hosts.get(name=3Dhost).nics.get(name=3Dif_name)<span style=3D"color=
:#404040;background:gray;mso-highlight:gray"><o:p></o:p></span></span></p>
<p class=3D"MsoNormal" style=3D"text-align:left;text-autospace:none;directi=
on:ltr;unicode-bidi:embed">
<span style=3D"font-size:10.0pt;font-family:"Courrier New"">net =
=3D params.Network(name=3Dnet_name)<span style=3D"color:#404040;background:=
gray;mso-highlight:gray"><o:p></o:p></span></span></p>
<p class=3D"MsoNormal" style=3D"text-align:left;text-autospace:none;directi=
on:ltr;unicode-bidi:embed">
<span style=3D"font-size:10.0pt;font-family:"Courrier New"">act =
=3D params.Action(network=3Dnet)<span style=3D"color:#404040;background:gra=
y;mso-highlight:gray"><o:p></o:p></span></span></p>
<p class=3D"MsoNormal" style=3D"text-align:left;text-autospace:none;directi=
on:ltr;unicode-bidi:embed">
<span style=3D"font-size:10.0pt;font-family:"Courrier New"">nic.d=
etach(act)<span style=3D"color:#404040;background:gray;mso-highlight:gray">=
<o:p></o:p></span></span></p>
<p class=3D"MsoNormal" style=3D"text-align:left;text-autospace:none;directi=
on:ltr;unicode-bidi:embed">
<span style=3D"font-size:10.0pt;font-family:"Courrier New"">api.h=
osts.get(name=3Dhost).commitnetconfig()<span style=3D"color:#404040;backgro=
und:gray;mso-highlight:gray"><o:p></o:p></span></span></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed"><o:p> </o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed">Then I get the error:<o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed"><a href=3D"http://pastebin.com/3Md07huE">http://pastebin.com/3Md07hu=
E</a><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed"><o:p> </o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed">The same flow using the GUI works fine.<o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed"><o:p> </o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed">Network removal from the Datacenter is a trigger for me to run the d=
etachment operation therefore I use this flow.<o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed"><o:p> </o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed">I use the following components:<o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed"><o:p> </o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed"><span style=3D"font-size:10.0pt;font-family:"Courrier New"=
">rhevm-3.0.2_0001-2</span><o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed">ovirt-sdk (Using the latest from git repository)<o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed"><o:p> </o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed">Please advise how to proceed.<o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed"><o:p> </o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed">Thanks,<o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"text-align:left;direction:ltr;unicode-bidi:=
embed">Itzik<o:p></o:p></p>
</div>
</body>
</html>
--_000_4488206DC085244C886DBC9E7038B68918D382CEMTRDAG01mtlcom_--
12 years, 7 months
[Engine-devel] Manual DB change required - remove grant_mode column from DB
by Moti Asayag
Hi,
The commit which added the grant_mode column to the permissions table
was reverted (604ae480ab677b06e53abd0edfaf0ec04f017fb8).
If you upgraded the DB since the 25/3, please run manually the next
command in order to drop that column and run refresh procedure
afterwards/run upgrade script:
echo 'alter table permissions drop column grant_mode' | psql engine postgres
(supply database name if differ from engine).
Thanks,
Moti
12 years, 8 months
[Engine-devel] Getting rid of PowerMock?
by Yair Zaslavsky
Hi all,
As (almost) all of us can see,
Running BLL tests both takes considerable time, and also we have to take
class loading dependencies between classes with static methods when we
use mockStatic - IMHO, this is kinda frustrating.
Maybe we should start get rid of PowerMock.
Here is what I'm thinking of -
Currently, as we use no IoC for DAOs , for tested class we do not use
DbFacade.getInstance().getXXXDao()
instead we define:
protected XXXDao getXXXDao() {
return DBFacade.getInstance().getXXXDao();
}
And then in our tests we use Mockito to define how getXXDao acts in the
test.
The following can be achieved also for config values , the following way -
protected <T> T getConfig(ConfigValues key) {
return Config.<T> GetValue(key);
}
And then in code (for example, in a query test) -
doReturn(5).when(query).<Integer>
getConfig(any(ConfigValues.SomeIntegerConstant));
This effort can be done in small steps -
a. Define getConfig method in base classes (i.e AuditLoggalbeBase).
b. Rewrite parts (i.e Commands, and their tests) step by step (small
commits)
Thoughts and ideas are more than welcome,
Yair
12 years, 8 months
[Engine-devel] Monitor host's Default Gateway
by avi tal
Hi,
Detach host's interface that holds the Default Gateway would be very
dangerous. there for Engine must start monitor who holds the default
gateway.
It is true, a static IP interface can never add gateway (other than
mgmt) due to CanDoAction but what about DHCP?
If a non-mgmt interface with DHCP got the gateway, Engine must know
about it in order to protect connectivity to the host.
BTW, VDSM send these details in getCapabilities.
Bottom line, we should not limit other interfaces from holding gateway,
not by statically or dhcp configuration. there is a reason why someone
would like to have his gateway on a different interface than the mgmt.
But non-mgmt interface that holds the gateway should be treated as mgmt
interface when trying to remove or edit it.
Thanks
12 years, 8 months
[Engine-devel] Engine meeting
by Karsten 'quaid' Wade
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi:
I just learned that this team's open project meeting is held as a
teleconference.
Would you consider switching it to a regular IRC meeting, perhaps with
an occasional phone call?
IRC meetings have many advantages in an open project: low barrier of
access, easier to understand for non-native speakers, meeting log is
archivable and searchable, and more inviting for the project.
For phone meetings, do you publish the audio recording? That is not
optimal, but at least it allows for someone to transcribe the discussion.
Cheers - Karsten
- --
name: Karsten 'quaid' Wade, Sr. Community Architect
team: Red Hat Community Architecture & Leadership
uri: http://communityleadershipteam.org
http://TheOpenSourceWay.org
gpg: AD0E0C41
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iD8DBQFPcx1j2ZIOBq0ODEERAj1+AKDla8pokm8KifAoFOj/FE4fsXAP3wCeOJRL
oQfAO+hE2tXx5fbifJUeasY=
=Ftj6
-----END PGP SIGNATURE-----
12 years, 8 months