From: Jiří Filipovič Date: Fri, 3 Aug 2012 09:14:27 +0000 (+0000) Subject: tuned VM states and events X-Git-Tag: glite-lb-server_R_2_4_3_1~2 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=a564cb72cc176282e135092593d1ffcc9e75b6eb;p=jra1mw.git tuned VM states and events --- diff --git a/org.glite.lb.client/examples/job_status.c b/org.glite.lb.client/examples/job_status.c index 59f8413..b5c3356 100644 --- a/org.glite.lb.client/examples/job_status.c +++ b/org.glite.lb.client/examples/job_status.c @@ -388,6 +388,9 @@ static void printstat(edg_wll_JobStat stat, int level) printf("%svm_image : %s\n", ind, stat.vm_image); printf("%svm_require : %s\n", ind, stat.vm_require); printf("%svm_usage : %s\n", ind, stat.vm_usage); + printf("%svm_name : %s\n", ind, stat.vm_name); + printf("%svm_id : %s\n", ind, stat.vm_id); + printf("%svm_phy_hostname : %s\n", ind, stat.vm_phy_hostname); } printf("\n"); diff --git a/org.glite.lb.client/src/EventAttrNames.pl b/org.glite.lb.client/src/EventAttrNames.pl index 7f5d7d4..abb03dd 100644 --- a/org.glite.lb.client/src/EventAttrNames.pl +++ b/org.glite.lb.client/src/EventAttrNames.pl @@ -122,5 +122,6 @@ RESOURCES IMAGE REQUIRE - HOSTVM + HOSTNAME + ID /; diff --git a/org.glite.lb.client/src/StatusAttrNames.pl b/org.glite.lb.client/src/StatusAttrNames.pl index 82c89e2..ea4723a 100644 --- a/org.glite.lb.client/src/StatusAttrNames.pl +++ b/org.glite.lb.client/src/StatusAttrNames.pl @@ -121,4 +121,7 @@ VM_REQUIRE VM_STATE VM_USAGE + VM_ID + VM_NAME + VM_PHY_HOSTNAME /; diff --git a/org.glite.lb.state-machine/src/intjobstat_supp.c b/org.glite.lb.state-machine/src/intjobstat_supp.c index 6f01118..e28b610 100644 --- a/org.glite.lb.state-machine/src/intjobstat_supp.c +++ b/org.glite.lb.state-machine/src/intjobstat_supp.c @@ -581,6 +581,9 @@ char *enc_JobStat(char *old, edg_wll_JobStat* stat) if (ret) ret = enc_string(ret, stat->vm_usage); if (ret) ret = enc_string(ret, stat->vm_hostname); if (ret) ret = enc_string(ret, stat->vm_machine); + if (ret) ret = enc_string(ret, stat->vm_id); + if (ret) ret = enc_string(ret, stat->vm_name); + if (ret) ret = enc_string(ret, stat->vm_phy_hostname); return ret; } @@ -694,6 +697,9 @@ edg_wll_JobStat* dec_JobStat(char *in, char **rest) if (tmp_in != NULL) stat->vm_usage = dec_string(tmp_in, &tmp_in); if (tmp_in != NULL) stat->vm_hostname = dec_string(tmp_in, &tmp_in); if (tmp_in != NULL) stat->vm_machine = dec_string(tmp_in, &tmp_in); + if (tmp_in != NULL) stat->vm_id = dec_string(tmp_in, &tmp_in); + if (tmp_in != NULL) stat->vm_name = dec_string(tmp_in, &tmp_in); + if (tmp_in != NULL) stat->vm_phy_hostname = dec_string(tmp_in, &tmp_in); *rest = tmp_in; diff --git a/org.glite.lb.state-machine/src/process_event_virtual_machine.c b/org.glite.lb.state-machine/src/process_event_virtual_machine.c index ced31f1..3829ee4 100644 --- a/org.glite.lb.state-machine/src/process_event_virtual_machine.c +++ b/org.glite.lb.state-machine/src/process_event_virtual_machine.c @@ -71,11 +71,16 @@ int processEvent_VirtualMachine(intJobStat *js, edg_wll_Event *e, int ev_seq, in if (USABLE_DATA(res)) { rep_cond(js->pub.vm_require, e->vMCreate.require); rep_cond(js->pub.vm_image, e->vMCreate.image); + rep_cond(js->pub.vm_id, e->vMCreate.id); + rep_cond(js->pub.vm_name, e->vMCreate.name); + rep_cond(js->pub.owner, e->vMCreate.owner); + rep_cond(js->pub.vm_hostname, e->vMCreate.hostname); + rep_cond(js->pub.destination, e->vMCreate.hostname); } break; case EDG_WLL_EVENT_VMHOST: if (USABLE_DATA(res)) { - rep_cond(js->pub.vm_hostname, e->vMHost.hostvm); + rep_cond(js->pub.vm_phy_hostname, e->vMHost.hostname); //XXX transfer to prolog/boot state? } break; diff --git a/org.glite.lb.types/events.T b/org.glite.lb.types/events.T index abad712..49352a6 100644 --- a/org.glite.lb.types/events.T +++ b/org.glite.lb.types/events.T @@ -528,9 +528,13 @@ @type VMCreate create (register) virtual machine string image machine image string require machine requirements + string id machine id + string name machine name + string owner machine owner + string hostname hostname of VM @type VMHost - string hostvm hostname of VM + string hostname hostname of physical machine of VM @type VMRunning VM is running diff --git a/org.glite.lb.types/status.T b/org.glite.lb.types/status.T index e93b31a..064dde8 100644 --- a/org.glite.lb.types/status.T +++ b/org.glite.lb.types/status.T @@ -197,6 +197,9 @@ string vm_require VM requirement on physical machine string vm_usage VM usage string vm_hostname VM hostname string vm_machine physical machine on which VM runs +string vm_id VM id +string vm_name VM name +string vm_phy_hostname hostname of physical machine running VM _pad_ 20