Logging retrials
This commit is contained in:
@@ -125,6 +125,17 @@ class Provision extends BaseController
|
||||
$ContainerName = $this->generatedContainerName($productId, $pr->id ); // $productId . str_pad($pr->id, 10, "0", STR_PAD_LEFT);
|
||||
$partFolder = $ansible_folder . "/parts/" . $provisionUID;
|
||||
|
||||
// // make sure we compose the docker compose to use
|
||||
// $this->prepareDockerComposer(
|
||||
// $subscriptionId,
|
||||
// $provisionPort,
|
||||
// $productId,
|
||||
// $provisionUID,
|
||||
// $memberID,
|
||||
// $pr->internal_url
|
||||
// );
|
||||
|
||||
|
||||
$allocatedPort = $provisionPort;
|
||||
$this->updateToNow($provisionUID);
|
||||
|
||||
@@ -182,6 +193,7 @@ class Provision extends BaseController
|
||||
$internal_url
|
||||
){
|
||||
|
||||
|
||||
$public_path = FCPATH;
|
||||
$ansible_folder = str_replace("public/", "ANSIBLE", $public_path);
|
||||
$partMachineLocal = $_ENV['PATH_MACHINE_LOCAL'];
|
||||
@@ -194,6 +206,14 @@ class Provision extends BaseController
|
||||
$ContainerName = $this->generatedContainerName($productId, $members_product_id ); // $productId . str_pad($pr->id, 10, "0", STR_PAD_LEFT);
|
||||
$partFolder = $ansible_folder . "/parts/" . $member_product_uid;
|
||||
|
||||
/*
|
||||
* may be if the file is already there , we can turn back
|
||||
*
|
||||
*/
|
||||
$destination_composer_path = $ansible_folder . "/parts/" . $provisionUID . "/docker-compose.yml";
|
||||
|
||||
|
||||
|
||||
$allocatedPort = $provisionPort;
|
||||
$this->updateToNow($provisionUID);
|
||||
|
||||
@@ -220,7 +240,6 @@ class Provision extends BaseController
|
||||
$composer_template_contents = str_replace("CNT_DB_DATA", '172.16.4.96:3307', $composer_template_contents);
|
||||
|
||||
//Save to the specific path
|
||||
$destination_composer_path = $ansible_folder . "/parts/" . $provisionUID . "/docker-compose.yml";
|
||||
$composerFile = fopen($destination_composer_path, "w") or die("Unable to open file!");
|
||||
fwrite($composerFile, $composer_template_contents);
|
||||
fclose($composerFile);
|
||||
@@ -418,9 +437,7 @@ class Provision extends BaseController
|
||||
$provision_port = $pr->provision_port;
|
||||
$members_product_id = $pr->mpid;
|
||||
|
||||
|
||||
|
||||
log_message('critical', "Members Product ID ***** ".$pr->mpid);
|
||||
log_message('critical', "Members Product ID ***** ".$pr->mpid." Provision_Status == ". $pr->provision_status);
|
||||
|
||||
|
||||
$ansible_host = $productId . "_SERVER";
|
||||
@@ -438,12 +455,15 @@ class Provision extends BaseController
|
||||
|
||||
// let us make sure all we promise are availale
|
||||
//"WHAT_PART_LOCAL
|
||||
// Remember this is in a CONTAINER
|
||||
|
||||
|
||||
// Remember this is in a CONTAINER so the path follows
|
||||
$this_composer_part_location = "/var/www/html/ANSIBLE/parts/". $productUid;
|
||||
if (!is_dir( $this_composer_part_location )) {
|
||||
mkdir($this_composer_part_location , 0700);
|
||||
}
|
||||
|
||||
// make sure we compose the docker compose to use
|
||||
$this->prepareDockerComposer(
|
||||
$members_product_id,
|
||||
$provision_port,
|
||||
|
||||
Reference in New Issue
Block a user