Bug 1253317 - misleading output of `oc rollback`
misleading output of `oc rollback`
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Deployments (Show other bugs)
3.0.0
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Dan Mace
zhou ying
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-13 09:21 EDT by Christoph Görn
Modified: 2015-11-23 09:24 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 09:24:29 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Christoph Görn 2015-08-13 09:21:55 EDT
Description of problem:
`oc rollback` does not mention the namespace it is referring to...

Version-Release number of selected component (if applicable):
3.0.1.0

How reproducible:
[master-1 ~]$ oc rollback django-frontend -n testing 
#10 rolled back to django-frontend-8
Warning: the following images triggers were disabled: django-example
  You can re-enable them with: oc deploy django-frontend --enable-triggers
[master-1 ~]$ oc deploy django-frontend --enable-triggers
Error from server: deploymentConfig "django-frontend" not found
[master-1 ~]$ oc deploy django-frontend --enable-triggers -n testing
enabled image triggers: django-example


Steps to Reproduce:
1. oc rollback django-frontend -n testing
2. oc deploy django-frontend --enable-triggers
3. oc deploy django-frontend --enable-triggers -n testing

Actual results:
Warning: the following images triggers were disabled: django-example
  You can re-enable them with: oc deploy django-frontend --enable-triggers

Expected results:
Warning: the following images triggers were disabled: django-example
  You can re-enable them with: oc deploy django-frontend --enable-triggers --namespace testing

Additional info:
Comment 2 Dan Mace 2015-08-13 10:40:33 EDT
I'm recommending a low priority on this one. My guess is that rolling back outside the current user's namespace is rare, and that the un-namespaced instructions provided will work (as the user probably invoked rollback without -n to begin with).
Comment 3 Dan Mace 2015-08-18 10:35:46 EDT
https://github.com/openshift/origin/pull/4235
Comment 4 zhou ying 2015-09-01 05:55:57 EDT
I'v tested on the latest origin env, the bug have modified:
openshift v1.0.5-104-gc10dc00
kubernetes v1.1.0-alpha.0-1605-g44c91b1

[root@ip-10-153-249-50 bin]# oc rollback hooks-1
#3 rolled back to hooks-1
Warning: the following images triggers were disabled: mysql-55-centos7
  You can re-enable them with: oc deploy hooks --enable-triggers -n zhouy1
[root@ip-10-153-249-50 bin]# oc deploy hooks --enable-triggers -n zhouy1

When the OSE env have new env I'll retest.
Comment 5 zhou ying 2015-09-08 22:02:31 EDT
Have tested on the latest ose env, the bug have modified:
oc v3.0.1.900-185-g2f7757a
kubernetes v1.1.0-alpha.0-1605-g44c91b1

OpenShift:0902 openshift$ oc rollback hooks-1
#3 rolled back to hooks-1
Warning: the following images triggers were disabled: mysql-55-centos7
  You can re-enable them with: oc deploy hooks --enable-triggers -n zhouy

OpenShift:0902 openshift$ oc deploy hooks --enable-triggers -n zhouy
enabled image triggers: mysql-55-centos7
Comment 6 Brenton Leanhardt 2015-11-23 09:24:29 EST
This fix is available in OpenShift Enterprise 3.1.

Note You need to log in before you can comment on or make changes to this bug.