Skip to content
This repository was archived by the owner on May 24, 2023. It is now read-only.

Timeout on task ""Controller - Installing" #13

Open
gael-fuhs2 opened this issue Dec 7, 2020 · 6 comments
Open

Timeout on task ""Controller - Installing" #13

gael-fuhs2 opened this issue Dec 7, 2020 · 6 comments

Comments

@gael-fuhs2
Copy link

Hi,

When we install the controller, we reach the timeout of 10min on this tasks, because we have a slow-lan and it take 10min to download image's docker before begining the installation and configuration of the controller. So can we add a variable to specify timeout time for this task if we have a slow-lan please ?

Thanks for your actions

@brianehlert
Copy link
Collaborator

I approach this issue a little differently.

Line 217 here: https://github.com/brianehlert/ansible-nginx-controller-examples/blob/master/nginx_install_controller.yaml
I have a task to copy the package prior to invoking the installer role.

I would suggest you try that for your high latency situation - to separate the different failure points.

@gael-fuhs2
Copy link
Author

My problem is not at this moment, it's when the controller install it with "installer.sh" line 39 https://github.com/nginxinc/ansible-role-nginx-controller-install/blob/master/tasks/main.yml
During the execution of this task, it does some pull from dockerhub which take a lot of time. But your idea to do some pull on preparation before installcan solve the problem but I don't have the list of pull to do from your example. Can you update your example with an task like this with the listing please ?

- name: download image docker
  docker_image:
    name: "{{ item }}"
  vars:
    - ....

Thanks you a lot in advance for your answer and action

@brianehlert
Copy link
Collaborator

Thank you for the additional detail.
With current versions of Controller only dependent packages should be pulled, docker being the largest.
Feel free to reach out to me directly through email - I am happy to work with you offline to get things sorted out.
In the mean time I will review the examples and make sure they cover the needs.

@brianehlert
Copy link
Collaborator

I want to circle back to this. Because recent releases of Controller should not be pulling docker images. All images should be included in the NGINX Controller installer tar.
Can you please check your version of NGINX Controller.
The most recent is 3.12.

@djbrogan
Copy link

djbrogan commented Jun 8, 2021

This is a problem for us, and it really just has to do with how fast our lower environment is (the hypervisor storage is due for an upgrade).

...
 16. Initializing the database...
     The NGINX Controller database has been initialized.
 17. Starting the NGINX Controller stack...
 Failed to deploy the NGINX Controller services.
 Detailed information can be found in the installation logs at /var/log/nginx-controller/failure. Retry the NGINX Controller installation or contact NGINX Support for assistance. You may be asked to provide the logs.

It would really be nice to provide a variable to customize the timeout based on practical experience with the target environment, rather than one size fits all.

- name: "Controller - Installing"
  shell: |
    timeout --foreground {{ nginx_controller_install_timeout | default('10m') }} \
    ./install.sh \
    ...

@brianehlert
Copy link
Collaborator

Thanks for the issue.
Are you deploying Controller as a common process? Such as creating ephemeral instances?

I normally consider Controller installation to be a rare occurrence, as it is a piece of infrastructure.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants