Bug 1427503 - VM extend retirement fails
Summary: VM extend retirement fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.8.0
Assignee: Tina Fitzgerald
QA Contact: Mike Shriver
URL:
Whiteboard: retirement
Depends On:
Blocks: 1433980
TreeView+ depends on / blocked
 
Reported: 2017-02-28 12:20 UTC by Sachin
Modified: 2020-04-15 15:23 UTC (History)
9 users (show)

Fixed In Version: 5.8.0.7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1433980 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:25:10 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:
mshriver: automate_bug+


Attachments (Terms of Use)

Description Sachin 2017-02-28 12:20:14 UTC
Description of problem:

Not able to extend VM retirement date using instruction given on
https://access.redhat.com/documentation/en-us/red_hat_cloudforms/4.2/html-single/provisioning_virtual_machines_and_hosts/#extending-retirement-dates


This was not seen in 5.6.1.2
~~~
irb(main):002:0> e.retires_on
=> Fri, 28 Apr 2017
irb(main):003:0> e.retires_on += 1
=> Sat, 29 Apr 2017
irb(main):004:0> e.retires_on.class
=> Date
~~~


But observed in 5.7.0.17
~~~
irb(main):020:0> e.retires_on
=> Tue, 28 Mar 2017 00:04:52 UTC +00:00
irb(main):021:0> e.retires_on += 1
=> Tue, 28 Mar 2017 00:04:53 UTC +00:00
irb(main):022:0> e.retires_on.class
=> ActiveSupport::TimeWithZone
irb(main):024:0> e.retires_on
=> Tue, 28 Mar 2017 00:04:53 UTC +00:00
irb(main):025:0> e.retires_on += 30.days
=> Thu, 27 Apr 2017 00:04:53 UTC +00:00
~~~


Minor changes needed in manageiq-content/content/automate/ManageIQ/Infrastructure/VM/Retirement/Email.class/__methods__/vm_retire_extend.rb


- vm.retires_on += vm_retire_extend_days.to_i
+ vm.retires_on += vm_retire_extend_days.to_i.days


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

How reproducible:
Aways


Steps to Reproduce:
Follow 

https://access.redhat.com/documentation/en-us/red_hat_cloudforms/4.2/html-single/provisioning_virtual_machines_and_hosts/#extending-retirement-dates


Actual results:


Expected results:


Additional info:

Comment 5 CFME Bot 2017-03-16 16:11:16 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/ddb92386ddc38e5eb908e02702fd01f48b6b9426

commit ddb92386ddc38e5eb908e02702fd01f48b6b9426
Author:     Tina Fitzgerald <tfitzger>
AuthorDate: Thu Mar 2 14:09:24 2017 -0500
Commit:     Tina Fitzgerald <tfitzger>
CommitDate: Thu Mar 9 13:56:38 2017 -0500

    Fix extend_retires_on method for number of days.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1427503

 app/models/mixins/retirement_mixin.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 7 Mike Shriver 2017-03-27 17:58:23 UTC
Verified in CFME 5.8.0.7

A rhevm virtual machine with a set retirement date can have its retirement date extended by using the automation buttons.  The retirement date was extended the default value of 14 days past the originally set date.


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