Commit 3c5e82d6 authored by Leigh Stoller's avatar Leigh Stoller

Fix to Jacks constraint stuff:

Problem: A user with a reservation at one cluster, was trying to start
an experiment at a different cluster. But after selecting the other
cluster and clicking next, that selection was being reset to the cluster
with the reservation, as part of our overly helpful cluster picker code,
which is fired off in a callback from Jacks.

Question: Why is that happening when clicking next, to go from the
Finalize step to the Schedule step, thus silently resetting the user's
choice.

Reason: There is a call to SwitchJacks("small") to make sure that the
small version of the topo was visible, in case the user goes back to the
finalize step. Not sure why ... but in any event, every call to
SwitchJacks(large|small) results in Jacks firing that callback, and
resetting the user's cluster choice.

Solution: Null out the callback when calling SwitchJacks().

There is probably a better solution to this, perhaps as part of a code
reorg on the entire instantiate page, which has grown many appendages
over time.
parent dec93290
......@@ -1461,7 +1461,7 @@ $(function ()
.addClass('col-lg-8 col-md-8 col-sm-8');
$('#stepsContainer #inline_large_jacks').html('');
$('#inline_large_container').addClass('hidden');
ppstart.ShowThumbnail(selected_rspec, updateJacksGraph);
ppstart.ShowThumbnail(selected_rspec, null);
//if (ispprofile) {
//ppstart.ChangeJacksRoot($('#stepsContainer-p-2 #inline_jacks'), true);
//}
......
......@@ -777,11 +777,8 @@ $(function () {
var thumbnail = null;
var jacksGraphCallback = null;
function ShowThumbnail(selected_rspec, updateJacksGraph)
{
if (updateJacksGraph)
{
jacksGraphCallback = updateJacksGraph;
}
var root = $('#stepsContainer-p-2 #inline_jacks');
if (! thumbnail)
{
......
<?php
#
# Copyright (c) 2006-2018 University of Utah and the Flux Group.
# Copyright (c) 2006-2019 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -616,71 +616,6 @@ class Profile
}
function BestAggregate($rspec = null) {
if (!$rspec) {
$rspec = $this->rspec();
}
$parsed_xml = simplexml_load_string($rspec);
if (count($parsed_xml->node) == 0) {
return null;
}
foreach ($parsed_xml->node as $node) {
# No XEN VMs on Cloudlab yet.
if ($node->sliver_type &&
$node->sliver_type["name"] &&
$node->sliver_type["name"] == "emulab-xen") {
return "Utah APT";
}
if ($node->hardware_type &&
$node->hardware_type["name"]) {
if ($node->hardware_type["name"] == "m400") {
return "Utah Cloudlab";
}
elseif ($node->hardware_type["name"] == "dl360") {
return "Utah DDC";
}
elseif ($node->hardware_type["name"] == "r320" ||
$node->hardware_type["name"] == "c6220") {
return "Utah APT";
}
}
# Check URL
if (! ($node->sliver_type &&
$node->sliver_type->disk_image &&
($node->sliver_type->disk_image["url"] ||
$node->sliver_type->disk_image["name"]))) {
continue;
}
if ($node->sliver_type->disk_image["name"]) {
$name = $node->sliver_type->disk_image["name"];
if (preg_match("/^http/", $name)) {
$url = $name;
}
else {
#
# The only image that runs on Cloudlab is UBUNTU14-64-ARM
#
if (preg_match("/ARM/", $name) ||
preg_match("/HPC/", $name) ||
preg_match("/OSCNF/", $name)) {
return "Utah Cloudlab";
}
return "Utah APT";
}
}
else {
$url = $node->sliver_type->disk_image["url"];
}
if (preg_match("/utah\.cloudlab\.us/", $url)) {
return "Utah Cloudlab";
}
if (preg_match("/emulab\.net/", $url) ||
preg_match("/geniracks\.net/", $url) ||
preg_match("/instageni/", $url)) {
return "Utah APT";
}
}
return null;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment