Strange issues with com.google.gwt.i18n.client.Messages.AlternateMessage [bz#1358837]
by Ramesh Nachimuthu
Hi,
We have a strange issue with the com.google.gwt.i18n.client.Messages.AlternateMessage in UIMessages.java. We have defined some alternate messages using @Messages.Select with Enums. But its doesn't work any more.
We have following messages in the UIMessages.java.
@Messages.AlternateMessage(value = { "UNKNOWN" , "None" , "INTERVAL" , "Minute" , "HOURLY" , "Hourly" , "DAILY" , "Daily" , "WEEKLY" , "Weekly" , "MONTHLY" , "Monthly" })
String recurrenceType((a)Messages.Select
GlusterVolumeSnapshotScheduleRecurrence recurrence);
@Messages.AlternateMessage(value = { "BYTES" , "{0} B" , "KiB" , "{0} KiB" , "MiB" , "{0} MiB" , "GiB" , "{0} GiB" , "TiB" , "{0} TiB" })
String sizeUnitString(String size, @Messages.Select
SizeConverter.SizeUnit sizeUnit);
But the generated UIMessages_.java doesn't use any of the enum conditions.
public java.lang.String recurrenceType(org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotScheduleRecurrence arg0) {
java.lang.String returnVal = null;
int arg0_ordinal = -1;
if (arg0 != null) {
arg0_ordinal = arg0.ordinal();
}
if (returnVal != null) {
return returnVal;
}
return "Incorrect enum";
}
public java.lang.String sizeUnitString(java.lang.String arg0,org.ovirt.engine.core.common.utils.SizeConverter.SizeUnit arg1) {
java.lang.String returnVal = null;
int arg1_ordinal = -1;
if (arg1 != null) {
arg1_ordinal = arg1.ordinal();
}
if (returnVal != null) {
return returnVal;
}
return arg0 + " TiB";
}
It used to work earlier. Is there any known issue in the current GWT Version? or Am I missing something?.
Regards,
Ramesh
8 years, 2 months
execCmd() and storing stdout and stderr in log file
by Tomáš Golembiovský
Hi,
I had a need recently to run a command with execCmd() and store it's
output and error to a log file, while still receiving it in the calling
code. Redirecting the error to output stream to have all in one stream
is also useful feature.
All this can be done in the calling code:
a) On the shell level, by modyfing the command. This can be
intentionally dangerous because things like quoting of arguments has to
be considered and also could cause problems when wrappers (sudo, nice,
...) are used.
b) By handling the writing to files in a code. This would add
unnecessary code duplication in a long run. (I don't think I'm the only
one who can see a potential in this.) Also for asynchronous process
runs, when storing both stderr & stdout in one file, it requires polling
and some stream magic. It would be better to have this done right and
only once so it can be properly tested.
That's why I think having it present in execCmd() ready for everyone's
use is the best solution. Unfortunately it seems that the code is a)
essential on many places in vdsm and b) not properly covered by tests.
Which makes it hard to touch. Also apparently some refactoring is either
planned or already underway.
What is the situation about refactoring that code area? Anyone working
on it? Do we have an estimation of time-frame for it?
Any suggestions/ideas?
Tomas
--
Tomáš Golembiovský <tgolembi(a)redhat.com>
8 years, 2 months
Is there some guideline how to replace Linux Bridge with ovs on vdsm?
by lifuqiong
This is a multipart message in MIME format.
------=_NextPart_000_012C_01D1E818.185185B0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hi,
I want to using ovs replace with Linux bridge, Is there some
guideline or advice? If I want to use dpdk vhost-user port, how can I do
that?
Thank you
Mark
------=_NextPart_000_012C_01D1E818.185185B0
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-microsoft-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=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 14 =
(filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
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 Definitions */
@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=3DZH-CN link=3Dblue =
vlink=3Dpurple style=3D'text-justify-trim:punctuation'><div =
class=3DWordSection1><p class=3DMsoNormal><span lang=3DEN-US>Hi, =
<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US> I want to =
using ovs replace with Linux bridge, Is there some guideline or advice? =
If I want to use dpdk vhost-user port, how can I do =
that?<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p> </o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>Thank you<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>Mark<o:p></o:p></span></p></div></body></html>
------=_NextPart_000_012C_01D1E818.185185B0--
8 years, 2 months
[ANN] oVirt 4.0.2 Seconf Release Candidate is now available
by Sandro Bonazzola
The oVirt Project is pleased to announce the availability of the Second
Release Candidate of oVirt 4.0.2 for testing, as of July 27st, 2016.
This release is available now for:
* Fedora 23 (tech preview)
* Red Hat Enterprise Linux 7.2 or later
* CentOS Linux (or similar) 7.2 or later
This release supports Hypervisor Hosts running:
* Red Hat Enterprise Linux 7.2 or later
* CentOS Linux (or similar) 7.2 or later
* Fedora 23 (tech preview)
* oVirt Next Generation Node 4.0
This is pre-release software. Please take a look at our community page[1]
to know how to ask questions and interact with developers and users.
All issues or bugs should be reported via oVirt Bugzilla[2].
This pre-release should not to be used in production.
This update is the first release candidate of the second in a series of
stabilization updates to the 4.0 series.
4.0.2 brings 12 enhancements and nearly 100 bugfixes, including 43 high or
urgent severity fixes, on top of oVirt 4.0 series
See the release notes [3] for installation / upgrade instructions and a
list of new features and bugs fixed.
Notes:
* A new oVirt Live ISO is available. [4]
* A new oVirt Next Generation Node is available [4].
* A new oVirt Engine Appliance is already available.
* Mirrors[5] might need up to one day to synchronize.
Additional Resources:
* Read more about the oVirt 4.0.2 release highlights:
http://www.ovirt.org/release/4.0.2/
* Get more oVirt Project updates on Twitter: https://twitter.com/ovirt
* Check out the latest project news on the oVirt blog:
http://www.ovirt.org/blog/
[1] https://www.ovirt.org/community/
[2] https://bugzilla.redhat.com/enter_bug.cgi?classification=oVirt
[3] http://www.ovirt.org/release/4.0.2/
[4] http://resources.ovirt.org/pub/ovirt-4.0-pre/iso/
[5] http://www.ovirt.org/Repository_mirrors#Current_mirrors
--
Sandro Bonazzola
Better technology. Faster innovation. Powered by community collaboration.
See how it works at redhat.com
--
Sandro Bonazzola
Better technology. Faster innovation. Powered by community collaboration.
See how it works at redhat.com
8 years, 2 months
Seeing a memory issue in 4.0.1.1-1.el7.centos
by Lynn Dixon
Hello all. I hope I am sending this to the proper mailing list. If not,
please let me know.
I just installed the latest oVirt engine onto a RHEL7.2 machine last
night. I haven't built any VM's yet, but noticed that 27gig of memory was
being consumed in the Dashboard.
I did a quick check on top and noticed this: http://i.imgur.com/j9LB4q9.jpg
The two java processes seem to be using a heavy amount of ram and
reservations. How shall I troubleshoot this to find out whats going on?
*Lynn Dixon* | Red Hat Certified Architect #100-006-188
*Sr. Cloud Consultant* | Cloud Management Practice
Google Voice: 423-618-1414
Cell/Text: 423-774-3188
Click here to view my Certification Portfolio <http://red.ht/1XMX2Mi>
8 years, 2 months
[VDSM] Using INFO log by default
by Nir Soffer
Hi all,
We are using now INFO log level by default.
This has two important effects:
- We are not generating huge logs filling your disk
- Some flows may not be logged properly now
Please check that your code is logged properly - basically any state
change in the system must be logged using log.info().
To increase log level temporarily, use:
vdsClient -s 0 setLogLevel LEVEL [logger]
logger is one of vdsm logger, see /etc/vdsm/logger.conf
for the names.
Without logger, the root logger is modified.
To change logging level permanently, edit /etc/vdsm/logger.conf.
Nir
8 years, 2 months
Reply: [ovirt-users] Some question about vdsm rpc
by lifuqiong
Thank you very much for your helpful reply . The error of my question 4 is solved after I stopping debug vdsm code, just using print log info instead.
On Tue, Jul 26, 2016 at 12:46 PM, lifuqiong <lifuqiong(a)cncloudsec.com> wrote:
> 1. We know that xmlrpc and jsonrpc are enabled default in vdsm, vdsm
> supply these two service in one port or two? What’s the port number
> and how we can change it?
>
We use single port for both protocols. There is a code which peeks the data stream and decides which part of the code should handle the connection.
In config.py you can find 'management_port' option which defines which port will be used.
>
>
> 2. How can we know a vdsm host can supply an xmlrpc service or a
> jsonrpc service?
>
In config.py we have 'xmlrpc_enable' and 'jsonrpc_enable' which determine protocols available during runtime. With the latest vdsm both are enabled but keep in mind that xmlrpc is deprecated and will be removed soon.
>
>
> 3. I found that while ovirt engine installing a vdsm host, engine will
> check whether we are connecting to vdsm which supports xmlrpc only,
> engine send a ‘Host.ping’ jsonrpc request, why the code will enter
> into bindingxmlrpc.py?
>
> Did both jsonrpc and xmlrpc will call bindingxmlrpc.py?
>
During host installation we attempt to connect to a host using jsonrpc first and if it fails we we attempt to use xmlrpc. Older vdsms provide only xmlrpc so this behavior is for backward compatibility.
There are two binding modules bindingjsonrpc.py and bindingxmlrpc.py.
Common module for both bindings is API.py
>
>
> 4. Then, I just get an json return with code = 0 or code = 99. What
> does these error code mean ? I can’t find detail in rpcjson
> Specification(http://www.jsonrpc.org/specification)
>
There is a time when vdsm is not able to handle requests due to recovery logic which may take several seconds during this time we return code 99. Once the recovery is done vdsm returns correct codes like 0.
Recovery occurs only during start of vdsm.
>
>
> 5. When installing vdsm, I got an “Host server117 installation failed.
> Host is not reachable” error. Debugging code as follows:
>
> Bindingxmlrpc.py
>
> line637 def ping(self):
>
> line638 # print 'os.getuid()',os.getuid() = 0
>
> line639 # print 'os.getegit()',os.getegid() =0
>
> line640 api = API.Global()
>
> line641 return api.ping()
>
Can you share the logs with above failure?
>
>
> the api.ping() just open an file and update the file updating time,
> why these will throw an error code 0 or 99? And I see the ping()
> function created file /var/run/vdsm/client.log already exists in os,
>
ping verb was reused to detect whether vdsm is able to use jsonrpc.
This verb originally is used to make sure that any network reconfiguration did not break connection to the engine. During the process of reconfiguration engine call ping and vdsm based on file update time can restore old network configuration in case of failure.
> the only difference is the file is owned by root:root , not the vdsm:kvm?
> Why?
>
There are 2 vdsm processes running with different user permissions.
>
>
> Thank you.
>
>
>
>
> _______________________________________________
> Users mailing list
> Users(a)ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
8 years, 2 months
Some question about vdsm rpc
by lifuqiong
This is a multipart message in MIME format.
------=_NextPart_000_00F7_01D1E76E.0E1E4A60
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
1. We know that xmlrpc and jsonrpc are enabled default in vdsm, vdsm
supply these two service in one port or two? What's the port number and how
we can change it?
2. How can we know a vdsm host can supply an xmlrpc service or a
jsonrpc service?
3. I found that while ovirt engine installing a vdsm host, engine will
check whether we are connecting to vdsm which supports xmlrpc only, engine
send a 'Host.ping' jsonrpc request, why the code will enter into
bindingxmlrpc.py?
Did both jsonrpc and xmlrpc will call bindingxmlrpc.py?
4. Then, I just get an json return with code = 0 or code = 99. What
does these error code mean ? I can't find detail in rpcjson
Specification(http://www.jsonrpc.org/specification)
5. When installing vdsm, I got an "Host server117 installation failed.
Host is not reachable" error. Debugging code as follows:
Bindingxmlrpc.py
line637 def ping(self):
line638 # print 'os.getuid()',os.getuid() = 0
line639 # print 'os.getegit()',os.getegid() =0
line640 api = API.Global()
line641 return api.ping()
the api.ping() just open an file and update the file updating time, why
these will throw an error code 0 or 99? And I see the ping() function
created file /var/run/vdsm/client.log already exists in os,
the only difference is the file is owned by root:root , not the vdsm:kvm?
Why?
Thank you.
------=_NextPart_000_00F7_01D1E76E.0E1E4A60
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-microsoft-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=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 14 =
(filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
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;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
text-indent:21.0pt;
font-size:10.5pt;
font-family:"Calibri","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
/* Page Definitions */
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:914632915;
mso-list-type:hybrid;
mso-list-template-ids:496776084 1566756444 67698713 67698715 67698703 =
67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:18.0pt;
text-indent:-18.0pt;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-text:"%2\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:42.0pt;
text-indent:-21.0pt;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
margin-left:63.0pt;
text-indent:-21.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:84.0pt;
text-indent:-21.0pt;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-text:"%5\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:105.0pt;
text-indent:-21.0pt;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
margin-left:126.0pt;
text-indent:-21.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:147.0pt;
text-indent:-21.0pt;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-text:"%8\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:168.0pt;
text-indent:-21.0pt;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
margin-left:189.0pt;
text-indent:-21.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></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=3DZH-CN link=3Dblue =
vlink=3Dpurple style=3D'text-justify-trim:punctuation'><div =
class=3DWordSection1><p class=3DMsoListParagraph =
style=3D'margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 =
lfo1'><![if !supportLists]><span lang=3DEN-US><span =
style=3D'mso-list:Ignore'>1.<span style=3D'font:7.0pt "Times New =
Roman"'> =
</span></span></span><![endif]><span lang=3DEN-US>We know that xmlrpc =
and jsonrpc are enabled default in vdsm, vdsm supply these two service =
in one port or two? What’s the port number and how we can change =
it?<o:p></o:p></span></p><p class=3DMsoListParagraph =
style=3D'margin-left:18.0pt;text-indent:0cm'><span =
lang=3DEN-US><o:p> </o:p></span></p><p class=3DMsoListParagraph =
style=3D'margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 =
lfo1'><![if !supportLists]><span lang=3DEN-US><span =
style=3D'mso-list:Ignore'>2.<span style=3D'font:7.0pt "Times New =
Roman"'> =
</span></span></span><![endif]><span lang=3DEN-US>How can we know a vdsm =
host can supply an xmlrpc service or a jsonrpc =
service?<o:p></o:p></span></p><p class=3DMsoListParagraph><span =
lang=3DEN-US><o:p> </o:p></span></p><p class=3DMsoListParagraph =
style=3D'margin-left:18.0pt;text-indent:0cm'><span lang=3DEN-US> =
<o:p></o:p></span></p><p class=3DMsoListParagraph =
style=3D'margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 =
lfo1'><![if !supportLists]><span lang=3DEN-US><span =
style=3D'mso-list:Ignore'>3.<span style=3D'font:7.0pt "Times New =
Roman"'> =
</span></span></span><![endif]><span lang=3DEN-US>I found that while =
ovirt engine installing a vdsm host, engine will check whether we are =
connecting to vdsm which supports xmlrpc only, engine send a =
‘Host.ping’ jsonrpc request, why the code will enter =
into bindingxmlrpc.py?<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>Did both jsonrpc and xmlrpc will call =
bindingxmlrpc.py?<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p> </o:p></span></p><p class=3DMsoListParagraph =
style=3D'margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 =
lfo1'><![if !supportLists]><span lang=3DEN-US><span =
style=3D'mso-list:Ignore'>4.<span style=3D'font:7.0pt "Times New =
Roman"'> =
</span></span></span><![endif]><span lang=3DEN-US>Then, I just get an =
json return with code =3D 0 or code =3D 99. What does these error code =
mean ? I can’t find detail in rpcjson Specification(<a =
href=3D"http://www.jsonrpc.org/specification">http://www.jsonrpc.org/spec=
ification</a>)<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p> </o:p></span></p><p class=3DMsoListParagraph =
style=3D'margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 =
lfo1'><![if !supportLists]><span lang=3DEN-US><span =
style=3D'mso-list:Ignore'>5.<span style=3D'font:7.0pt "Times New =
Roman"'> =
</span></span></span><![endif]><span lang=3DEN-US>When installing vdsm, =
I got an “Host server117 installation failed. Host is not =
reachable” error. Debugging code as =
follows:<o:p></o:p></span></p><p class=3DMsoListParagraph><span =
lang=3DEN-US>Bindingxmlrpc.py<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US>line637 def =
ping(self):<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>line638 # print =
'os.getuid()',os.getuid() =3D 0<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
lang=3DEN-US>line639 # print =
'os.getegit()',os.getegid() =3D0<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
lang=3DEN-US>line640 api =3D =
API.Global()<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>line641 return =
api.ping()<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p> </o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>the api.ping() just open an file and update the file =
updating time, why these will throw an error code 0 or 99? And I see the =
ping() function created file /var/run/vdsm/client.log already exists in =
os, <o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US>the =
only difference is the file is owned by root:root , not the vdsm:kvm? =
Why?<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p> </o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>Thank you.<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p> </o:p></span></p></div></body></html>
------=_NextPart_000_00F7_01D1E76E.0E1E4A60--
8 years, 2 months
Debug vdsm 4.0.0 report error: libvirt: XML-RPC error : Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
by lifuqiong
This is a multipart message in MIME format.
------=_NextPart_000_001E_01D1E509.19780F20
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
I debugged vdsm with PyCharm, And I logged on my Centos 7.2 with root, and
get an error as follows:
Problem:
Traceback (most recent call last):
File "/usr/share/vdsm/vdsm", line 149, in run
serve_clients(log)
File "/usr/share/vdsm/vdsm", line 104, in serve_clients
cif = clientIF.getInstance(irs, log, scheduler)
File "/usr/share/vdsm/clientIF.py", line 204, in getInstance
cls._instance = clientIF(irs, log, scheduler)
File "/usr/share/vdsm/clientIF.py", line 106, in __init__
secret.clear()
File "/usr/lib/python2.7/site-packages/vdsm/virt/secret.py", line 92, in
clear
con = libvirtconnection.get()
File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line
163, in get
password)
File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line
99, in open_connection
return utils.retry(libvirtOpen, timeout=10, sleep=0.2)
File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 546, in retry
return func()
File "/usr/lib64/python2.7/site-packages/libvirt.py", line 105, in
openAuth
if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock':
Permission denied
Investitate:
According to the traceback above, the code in libvirt.py as below, and
os.geteuid() get '0' which shows the current user is root;
def openAuth(uri, auth, flags=0):
#print os.geteuid()
ret = libvirtmod.virConnectOpenAuth(uri, auth, flags)
if ret is None:raise libvirtError('virConnectOpenAuth() failed')
return virConnect(_obj=ret)
[root@server117 libvirt]# ll /var/run/libvirt/libvirt-sock
srwxrwx---. 1 root qemu 0 Jul 19 23:43 /var/run/libvirt/libvirt-sock
According that, root should not get an Permission denied error ? But why?
And I setenforce=0 , and still show Perssion denied error.
What's the reason? And how to solve it?
Thank you.
------=_NextPart_000_001E_01D1E509.19780F20
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-microsoft-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=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 14 =
(filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
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 Definitions */
@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=3DZH-CN link=3Dblue =
vlink=3Dpurple style=3D'text-justify-trim:punctuation'><div =
class=3DWordSection1><p class=3DMsoNormal><span lang=3DEN-US>I debugged =
vdsm with PyCharm, And I logged on my Centos 7.2 with root, and =
get an error as follows:<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p> </o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>Problem:<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p> </o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>Traceback (most recent call last):<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US> File =
"/usr/share/vdsm/vdsm", line 149, in =
run<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US> =
serve_clients(log)<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US> File "/usr/share/vdsm/vdsm", line 104, in =
serve_clients<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US> cif =3D clientIF.getInstance(irs, log, =
scheduler)<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US> File "/usr/share/vdsm/clientIF.py", line =
204, in getInstance<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US> cls._instance =3D clientIF(irs, log, =
scheduler)<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US> File "/usr/share/vdsm/clientIF.py", line =
106, in __init__<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US> secret.clear()<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US> File =
"/usr/lib/python2.7/site-packages/vdsm/virt/secret.py", line =
92, in clear<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US> con =3D =
libvirtconnection.get()<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US> File =
"/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", =
line 163, in get<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US> password)<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US> File =
"/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", =
line 99, in open_connection<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US> return =
utils.retry(libvirtOpen, timeout=3D10, =
sleep=3D0.2)<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US> File =
"/usr/lib/python2.7/site-packages/vdsm/utils.py", line 546, in =
retry<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US> return func()<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US> File =
"/usr/lib64/python2.7/site-packages/libvirt.py", line 105, in =
openAuth<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US> if ret is None:raise =
libvirtError('virConnectOpenAuth() failed')<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US>libvirtError: Failed to connect =
socket to '/var/run/libvirt/libvirt-sock': Permission =
denied<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p> </o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>Investitate:<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US>According to the traceback above, =
the code in libvirt.py as below, and os.geteuid() get =
‘0’ which shows the current user is =
root;<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p> </o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>def openAuth(uri, auth, flags=3D0):<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
lang=3DEN-US> #print =
os.geteuid()<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US> ret =3D =
libvirtmod.virConnectOpenAuth(uri, auth, flags)<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US> if ret is =
None:raise libvirtError('virConnectOpenAuth() =
failed')<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-indent:21.0pt'><span lang=3DEN-US>return =
virConnect(_obj=3Dret)<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p> </o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>[root@server117 libvirt]# ll =
/var/run/libvirt/libvirt-sock<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US>srwxrwx---. 1 root qemu 0 Jul 19 =
23:43 /var/run/libvirt/libvirt-sock<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US>According that, root should not get =
an Permission denied error ? But why?<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US>And I setenforce=3D0 , and still =
show Perssion denied error.<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US>What’s the reason? And how to =
solve it?<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p> </o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>Thank you.<o:p></o:p></span></p></div></body></html>
------=_NextPart_000_001E_01D1E509.19780F20--
8 years, 2 months
Type Safety on the Frontend (refactoring of all async queries)
by Martin Betak
Hi All,
today a *major* frontend refactoring was merged [1].
Its purpose was to remove some of the most significant artifacts of legacy C# code.
Huge thanks to Vojtech and Alex for heavenly patience during code review!
For a complete description please see the commit message, but here are
some highlights for programmers that need to touch FE code:
1) AsyncQuery, AsyncCallback and Converter are now generic and typesafe
(formerly INewAsyncCallback and IAsyncConverter).
2) It is no longer possible (or desirable) to PASS MODEL to queries.
From within Model sublasses `new AsyncQuery<>(...)` will have the correct value set
(see patch for impl details) and if you want to run a query on a different model
(so the infrastructure would set the progress spinner on that model instead),
usually for the purpose of a ListModel showing a popup window - where we want to
display the spinner on the dialog window instead, you can use the
`myWindowModel.asyncQuery(...)` helper factory to create query with model set
to myWindowModel.
// note: this also has the nice side-effect of eliminating the harmful pattern of using
// the model value from within callbacks by casting it to surrounding model type (while that
// value is already available by feature of java inner classes)
3) AsyncDataProvider's API methods now deal with strongly typed queries. This is facilitated
through usage of strongly typed Converters (please see some defined converters -> usually
you just need a CastingConverter<> or a ListConverter<>).
Please use this architectural layer of strongly typed AsyncDataProvider to your advantage.
(as plain Fronted.runQuery does not provide any guarantees and leaves you at risk of
mis-casting the return value).
If you have any more questions please feel free to ask me or look at the patch for details
(warning: it's quite big!).
This kind of major change necessarily touched all areas of the code (those issuing queries...)
and there is of course some probability that something may break. But I believe this risk is
well outweight by the benefits. Nevertheless if you find any issue please let me know and
we can fix it together.
Thanks again to anyone who contributed to this noble effort.
Best regards :-)
Martin
[1] https://gerrit.ovirt.org/#/c/60822/
8 years, 2 months