Bug 1388464 - throw warning to show that older tier commands are depricated and will be removed.
Summary: throw warning to show that older tier commands are depricated and will be rem...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: tier
Version: rhgs-3.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: RHGS 3.2.0
Assignee: hari gowtham
QA Contact: Bala Konda Reddy M
URL:
Whiteboard:
Depends On: 1388062 1388470
Blocks: 1351528 1351530
TreeView+ depends on / blocked
 
Reported: 2016-10-25 12:24 UTC by Atin Mukherjee
Modified: 2017-03-23 06:14 UTC (History)
6 users (show)

Fixed In Version: glusterfs-3.8.4-4
Doc Type: If docs needed, set a value
Doc Text:
The 'gluster volume attach-tier' and 'gluster volume detach-tier' commands are considered deprecated in favor of the new commands, 'gluster volume tier VOLNAME attach' and gluster volume tier VOLNAME detach'. This update includes extra warning message output when the older commands are used in order to give users advance notice of the deprecation and eventual removal of the older commands.
Clone Of: 1388062
Environment:
Last Closed: 2017-03-23 06:14:37 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0486 normal SHIPPED_LIVE Moderate: Red Hat Gluster Storage 3.2.0 security, bug fix, and enhancement update 2017-03-23 09:18:45 UTC

Description Atin Mukherjee 2016-10-25 12:24:23 UTC
+++ This bug was initially created as a clone of Bug #1388062 +++

Description of problem:
The older tier commands are needed to be removed to aid maintaining the code.
before removing we need to a warning that these commands are depricated, use the new ones.

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


How reproducible:
100%

Steps to Reproduce:
1.create any volume.
2.try attach brick using the old tier command "gluster v attach-tier <volname> <brick>..
3.same thing happens for detach tier related older conmands.

Actual results:
it works

Expected results:
should throw a warning and then continue.

Additional info:
future features might not work for this command.

--- Additional comment from Worker Ant on 2016-10-24 06:58:30 EDT ---

REVIEW: http://review.gluster.org/15713 (CLI/TIER: throw warning regarding the removal of the older commands.) posted (#1) for review on master by hari gowtham (hari.gowtham005@gmail.com)

--- Additional comment from Worker Ant on 2016-10-25 00:23:46 EDT ---

REVIEW: http://review.gluster.org/15713 (CLI/TIER: throw warning regarding the removal of the older commands.) posted (#2) for review on master by hari gowtham (hari.gowtham005@gmail.com)

--- Additional comment from Worker Ant on 2016-10-25 07:55:43 EDT ---

COMMIT: http://review.gluster.org/15713 committed in master by Dan Lambright (dlambrig@redhat.com) 
------
commit 62238f9fb3511dc854651e694bb27b9ebce1e19e
Author: hari <hgowtham@redhat.com>
Date:   Mon Oct 24 16:24:23 2016 +0530

    CLI/TIER: throw warning regarding the removal of the older commands.
    
    The older tier commands for attach tier and detach tier have to be
    removed from code. This patch sends a warning asking to use new
    command as older ones are depricated and will be removed.
    
    Change-Id: Ie1c62947bad6ff106f40331ff6134838a6c72a7a
    BUG: 1388062
    Signed-off-by: hari <hgowtham@redhat.com>
    Reviewed-on: http://review.gluster.org/15713
    Tested-by: hari gowtham <hari.gowtham005@gmail.com>
    Smoke: Gluster Build System <jenkins@build.gluster.org>
    NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Dan Lambright <dlambrig@redhat.com>

Comment 2 Atin Mukherjee 2016-11-07 04:27:52 UTC
upstream mainline : http://review.gluster.org/15713 (merged)
upstream 3.9 : http://review.gluster.org/15723 (merged)
downstream : https://code.engineering.redhat.com/gerrit/#/c/88375/ (pending for acks)

Comment 6 Bala Konda Reddy M 2017-02-06 15:50:07 UTC
1. gluster volume attach-tier command
While attaching tier to the volume using the old command, it is throwing correct warning message that the command will be deprecated in future. and asked to continue or not
 
root@dhcp35-102 ~]# gluster volume attach-tier testvol replica 2 dhcp35-102.lab.eng.blr.redhat.com:/bricks/brick2/testvol_tier0 dhcp35-232.lab.eng.blr.redhat.com:/bricks/brick2/testvol_tier1 dhcp35-54.lab.eng.blr.redhat.com:/bricks/brick2/testvol_tier2 dhcp35-61.lab.eng.blr.redhat.com:/bricks/brick2/testvol_tier3

gluster volume attach-tier <VOLNAME> [<replica COUNT>] <NEW-BRICK>... is deprecated. Use the new command 'gluster volume tier <VOLNAME> attach [<replica COUNT>] <NEW-BRICK>... [force]'

Do you want to Continue? (y/n) y
volume attach-tier: success
Tiering Migration Functionality: testvol: success: Attach tier is successful on testvol. use tier status to check the status.
ID: c3434783-f9bb-40aa-bf36-4a4fe26a1ead

2. gluster volume detach-tier command
a.When detach-tier start is issued, throwing expected warning message

[root@dhcp35-102 brick2]# gluster volume detach-tier testvol start
gluster volume detach-tier <VOLNAME> <start|stop|status|commit|force> is deprecated. Use the new command 'gluster volume tier <VOLNAME> detach <start|stop|status|commit|force>'
Do you want to Continue? (y/n) y
volume detach-tier start: success
ID: 0278fada-2c0a-4d72-a5c7-8d37aaabd3cf

b.When detach-tier stop is issued, throwing expected warning message
[root@dhcp35-102 brick2]# gluster volume detach-tier testvol stop
gluster volume detach-tier <VOLNAME> <start|stop|status|commit|force> is deprecated. Use the new command 'gluster volume tier <VOLNAME> detach <start|stop|status|commit|force>'
Do you want to Continue? (y/n) y
  Node Rebalanced-files size scanned failures skipped status run time in h:m:s
  --------- ----------- ----------- ----------- ----------- ----------- ------------ --------------
  localhost 0 0Bytes 0 0 0 in progress 0:0:0
  dhcp35-232.lab.eng.blr.redhat.com 0 0Bytes 0 0 0 completed 0:0:7
  dhcp35-54.lab.eng.blr.redhat.com 0 0Bytes 0 0 0 completed 0:0:7
  dhcp35-61.lab.eng.blr.redhat.com 0 0Bytes 0 0 0 completed 0:0:7
'detach-tier' process may be in the middle of a file migration.
The process will be fully stopped once the migration of the file is complete.
Please check detach-tier process for completion before doing any further brick related tasks on the volume.

c.When detach-tier status is issued, throwing expected warning message
[root@dhcp35-102 brick2]# gluster volume detach-tier testvol status
gluster volume detach-tier <VOLNAME> <start|stop|status|commit|force> is deprecated. Use the new command 'gluster volume tier <VOLNAME> detach <start|stop|status|commit|force>'
Do you want to Continue? (y/n) y
  Node Rebalanced-files size scanned failures skipped status run time in h:m:s
  --------- ----------- ----------- ----------- ----------- ----------- ------------ --------------
  localhost 0 0Bytes 0 0 0 completed 0:0:6
  dhcp35-232.lab.eng.blr.redhat.com 0 0Bytes 0 0 0 completed 0:0:5
  dhcp35-54.lab.eng.blr.redhat.com 0 0Bytes 0 0 0 completed 0:0:5
  dhcp35-61.lab.eng.blr.redhat.com 0 0Bytes 0 0 0 completed 0:0:5

d. When detach-tier commit is issued after detach-tier start.

[root@dhcp35-102 brick2]# gluster volume detach-tier testvol commit
gluster volume detach-tier <VOLNAME> <start|stop|status|commit|force> is deprecated. Use the new command 'gluster volume tier <VOLNAME> detach <start|stop|status|commit|force>'
Do you want to Continue? (y/n) y
Removing tier can result in data loss. Do you want to Continue? (y/n) y
volume detach-tier commit: success
Check the detached bricks to ensure all files are migrated.
If files with data are found on the brick path, copy them via a gluster mount point before re-purposing the removed brick. 


e. When force option is issued, throwing expected message.

[root@dhcp35-102 ~]# gluster volume detach-tier testvol force
gluster volume detach-tier <VOLNAME> <start|stop|status|commit|force> is deprecated. Use the new command 'gluster volume tier <VOLNAME> detach <start|stop|status|commit|force>'
Do you want to Continue? (y/n) y
Removing tier can result in data loss. Do you want to Continue? (y/n) y
volume detach-tier commit force: success

While using the old commands it is throwing warning that the old tiering commands will be deprecated in future.

The new gluster tier commands are working fine.

Hence marking the bug as verified

Comment 7 Bala Konda Reddy M 2017-02-06 15:51:13 UTC
verified with glusterfs version 3.8.4-13

Comment 12 errata-xmlrpc 2017-03-23 06:14:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2017-0486.html


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