OpenConext / OpenConext-deploy

Ansible-based deployment automation for the OpenConext platform
Apache License 2.0
12 stars 21 forks source link

Authz-server started check may fail deployment #28

Closed remold closed 8 years ago

remold commented 9 years ago

Last task of roles/authz-server/tasks/main.yml may fail if authzserver is not yet started. Timing issue?

https://github.com/OpenConext/OpenConext-deploy/blob/master/roles/authz-server/tasks/main.yml#L36

Task is successful during rerun.

remold commented 8 years ago

Workaround used for teams is:

# no idea why this is necessary, as the init script returns an ok status also
# if teams is still initializing.  Waiting for the port to open works well
# though, and seems like to correct way to handle this.
- name: start the teams service
  service: name=teams state=started enabled=yes
  ignore_errors: true

- name: wait for teams to start
  wait_for: connect_timeout=30 port={{ springapp_tcpport }} state=started

- name: ensure the service is started
  service: name=teams enabled=yes state=started

There may be other services which have the same problem (most likely the tomcat/java services).

quartje commented 8 years ago

The restart of this element has a timeout of 45 seconds now which resolves this issue.