projectatomic / adb-utils

A set of utilities for managing services used provided in the Atomic Developer Bundle.
GNU General Public License v2.0
13 stars 22 forks source link

Fix #194 Delay between openshift service start and status #196

Closed praveenkumar closed 7 years ago

praveenkumar commented 7 years ago

This patch will poll service status and if it's activating state then not report quickly. I will create a box which will can be used for testing.

coolbrg commented 7 years ago

@praveenkumar This does seems to solve the issue at the moment with some delay in reporting openshift as running but definitely better than having sleep.

$ bundle exec vagrant up --provider libvirt && bundle exec vagrant service-manager status
Bringing machine 'default' up with 'libvirt' provider...
==> default: Uploading base box image as volume into libvirt storage...
==> default: Creating image (snapshot of base box volume).
==> default: Creating domain with the following settings...
==> default:  -- Name:              vagrant-service-manager_default
........
==> default: Creating shared folders metadata...
==> default: Starting domain.
==> default: Waiting for domain to get an IP address...
==> default: Waiting for SSH to become available...
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Configuring and enabling network interfaces...
==> default: Copying TLS certificates to /home/budhram/redhat/vagrant-service-manager/.vagrant/machines/default/libvirt/docker
==> default: Docker service configured successfully...
==> default: OpenShift service configured successfully...
Configured services:
docker - running
openshift - running
kubernetes - stopped

LGTM :+1:

LalatenduMohanty commented 7 years ago

@praveenkumar As per [1] activating is a valid state. So sccli openshift status should return activating if the service is in that state.

Units may be "active" or "inactive" as well as in the process of being activated or deactivated, 
i.e. between the two states (these states are called "activating", "deactivating").

A special "failed" state is available as well, which is very similar to "inactive" and is entered 
when the service failed in some way (process returned error code on exit, or crashed, or an 
operation timed out).

[1] https://www.freedesktop.org/software/systemd/man/systemd.html

LalatenduMohanty commented 7 years ago

@praveenkumar the question goes back to the sccli interface and their purpose. Do we expect that OpenShift service should be in active state after we run sccli openshift start? or do we expect sccli openshift status should return masked state VS actual state?

hferentschik commented 7 years ago

the question goes back to the sccli interface and their purpose. Do we expect that OpenShift service should be in active state after we run sccli openshift start?

That would be my preferred option