origin icon indicating copy to clipboard operation
origin copied to clipboard

oc describe dc my-dc not show latest deployment correctly.

Open cbarzu opened this issue 9 years ago • 4 comments

When we do oc describe dc which have more than 10 deployments, it is not shown correctly the latest deployment.

Version
 ./oc version
oc v1.3.3
kubernetes v1.3.0+52492b4
features: Basic-Auth

Server https://localhost:8443
kubernetes v1.2.0-36-g4a3f9c5
Steps To Reproduce
  1. Deploy an aplication
  2. oc deploy --latest my-dc more than 10 times.
  3. oc describe my-dc
Current Result
Deployment #79 (latest):
	Created:	8 months ago
	Status:		Failed
	Replicas:	0 current / 0 desired
Deployment #105:
	Created:	11 days ago
	Status:		Complete
	Replicas:	0 current / 0 desired
Deployment #104:
	Created:	11 days ago
	Status:		Complete
	Replicas:	0 current / 0 desired

Expected Result
Deployment #79 :
	Created:	8 months ago
	Status:		Failed
	Replicas:	0 current / 0 desired
Deployment #105 (latest):
	Created:	11 days ago
	Status:		Complete
	Replicas:	0 current / 0 desired
Deployment #104:
	Created:	11 days ago
	Status:		Complete
	Replicas:	0 current / 0 desired

Regards, Claudiu

cbarzu avatar Feb 06 '17 15:02 cbarzu

oc get rc
aaa-102   0         0         234d
aaa-103   0         0         214d
aaa-104   0         0         11d
aaa-105   0         0         11d
aaa-106   1         1         10d
aaa-71    0         0         287d
aaa-79    0         0         265d

It seems like it sorts rc by name, and alphabetically aaa-103 is before aaa-79

cbarzu avatar Feb 06 '17 15:02 cbarzu

@claubrz the rc's are sorted alphabetically because the number is not mandatory for them (you can have standalone rc's that does not have any number in them)...

the deployments however, should be sorted numerrically.

mfojtik avatar Feb 06 '17 18:02 mfojtik

Hrm, deployments in oc describe dc should be sorted by the CreationTimestamp (latest on top). I did > 10 rollouts, the result is:

Deployment #11 (latest):
	Created:	12 seconds ago
	Status:		Failed
	Replicas:	0 current / 0 desired
Deployment #10:
	Created:	17 seconds ago
	Status:		Failed
	Replicas:	0 current / 0 desired
Deployment #9:
	Created:	21 seconds ago
	Status:		Failed
	Replicas:	0 current / 0 desired

mfojtik avatar Feb 06 '17 18:02 mfojtik

I can reproduce consistently the error, however I made a mistake with the server and client version.

Deployment #9 (latest):
	Created:	6 minutes ago
	Status:		Failed
	Replicas:	0 current / 0 desired
Deployment #11:
	Created:	4 minutes ago
	Status:		Failed
	Replicas:	0 current / 0 desired
Deployment #10:
	Created:	4 minutes ago
	Status:		Failed
	Replicas:	0 current / 0 desired

oc version

oc v3.3.0.34
kubernetes v1.3.0+52492b4
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server ---
openshift v3.3.0.35
kubernetes v1.3.0+52492b4

Using the origin client, it happens the same so I thought it was a client error.

./oc version
oc v1.3.3
kubernetes v1.3.0+52492b4
features: Basic-Auth

Server ---
openshift v3.3.0.35
kubernetes v1.3.0+52492b4

Since it seems that with origin works fine, you can close the ticket.

Regards, Claudiu

cbarzu avatar Feb 07 '17 09:02 cbarzu