• 15

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

Thank you for taking the time to read this.

We have a build trigger connected to our bitbucket repo that creates a docker container of our server and stores it as an image in the Container Registry on the Google Cloud Console.

We also have a Virtual Machine instance created under the Compute Engine that references this image. In general, all of this works fine. We are able to run our application as a docker container on this VM. We can connect to it remotely no problem.

In order to help streamline our process, we wanted the build trigger to force the VM to reset so that it would always be running the most up to date version of the docker container.

We did this by creating a Cloud Function. On the Topic:cloud-builds, we trigger a python script that resets our VM instance. We also know this works as whenever a build is completed we can see the VM reset within the VM logs.

The problem is that for some reason it does not always pick up the latest image. In fact, sometimes doing a manual reset on the VM does not do it. A number of resets (2 to 3) are required before the new container image shows up.

Is there something wrong with our approach for trying to do this? Or is there a certain amount of time (a minute or so) that has to pass before the new container image is available to be used within a VM instance?

Thank you again.

      • 2
    • Can you post some more information about the build process (in particular how the image is built / pushed and how the topic is triggered). My guess is that you have a race condition where something is pushed to the topic before the image push is done, potentially restarting the instance before the image is available.

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags