New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Yum capabilities to System updates #1619

Closed
MFlyer opened this Issue Jan 20, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@MFlyer
Member

MFlyer commented Jan 20, 2017

Hi @rockstor/developers ,
currently our Rockstor handles only Rockstor updates, firing alerts only on Rockstor updates, and users don't have any kind of alert and/or way to yum update from WebUI.

Decided to open this issue after recent yum updates solving major issues like samba & nss related

Mirko

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Mar 7, 2017

Adding yum icon html element
Ref to #1619

Signed-off-by: Mirko Arena <mirko.arena@gmail.com>

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Mar 7, 2017

Adding new pkg_mgmt func plus data_collector emitter
Ref to #1619
Over pkg_mgmt new yum_check func running yum check-update:
we throw rc != 0 because we need it, if rc = 0 no updates,
if rc == 100 then we have some available packages updates
data_collector new yum_updates emitter return True/False
starting from yum_check returned rc val

Signed-off-by: Mirko Arena <mirko.arena@gmail.com>

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Mar 7, 2017

base.html indent fixing, data_collector missing spawn fixing and
router.js new socket.io handler

Ref to #1619
Over router.js addend new yum updates checker function
on every run if data.yum_updates True we notify user over WebUI
Debugging with 20 secs sleep over data_collector, moving to 1 hour
Current "Avail yum updates icon" is Font Awesome 4.7 dashboard
(check other PR for FA 4.7 @schakrava)

Signed-off-by: Mirko Arena <mirko.arena@gmail.com>
@MFlyer

This comment has been minimized.

Show comment
Hide comment
@MFlyer

MFlyer Mar 7, 2017

Member

Note about ab2d320, 839c8e2, 86cb21d :

Tests with:
yum downgrade -y wpa_supplicant -> Blinking dashboard font awesome icon (4.7)
yum update -y wpa_supplicant -> dashboard icon hidden

Font Awesome note : change router.js icon to an old font awesome icon (ex. ban) to test till you get FA 4.7

Mirko

Member

MFlyer commented Mar 7, 2017

Note about ab2d320, 839c8e2, 86cb21d :

Tests with:
yum downgrade -y wpa_supplicant -> Blinking dashboard font awesome icon (4.7)
yum update -y wpa_supplicant -> dashboard icon hidden

Font Awesome note : change router.js icon to an old font awesome icon (ex. ban) to test till you get FA 4.7

Mirko

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Mar 8, 2017

Yum reporting enhancement - ref #1619
yum_check update to return check-update rc and avail packages list
pkg_changelog new func:
reading package changelog via changelog 1 (grab only last changelog)
return a dict made of package name, current changelog and package update
changelog

Signed-off-by: Mirko Arena <mirko.arena@gmail.com>

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Mar 10, 2017

Ref #1619 - Changing animations from jquery to css
Signed-off-by: Mirko Arena <mirko.arena@gmail.com>

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Mar 10, 2017

Ref #1619 - Added missing data_collector packages param
Signed-off-by: Mirko Arena <mirko.arena@gmail.com>

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Mar 21, 2017

Adding Yum updates modal and its handler
Ref to #1619 - Added new modal over base.html static template
plus modal handler over router.js

Signed-off-by: Mirko Arena <mirko.arena@gmail.com>

@schakrava schakrava added this to the Panamint Valley milestone Mar 24, 2017

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Apr 1, 2017

Adding yum icon html element
Ref to #1619

Signed-off-by: Mirko Arena <mirko.arena@gmail.com>

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Apr 1, 2017

Adding new pkg_mgmt func plus data_collector emitter
Ref to #1619
Over pkg_mgmt new yum_check func running yum check-update:
we throw rc != 0 because we need it, if rc = 0 no updates,
if rc == 100 then we have some available packages updates
data_collector new yum_updates emitter return True/False
starting from yum_check returned rc val

Signed-off-by: Mirko Arena <mirko.arena@gmail.com>

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Apr 1, 2017

base.html indent fixing, data_collector missing spawn fixing and
router.js new socket.io handler

Ref to #1619
Over router.js addend new yum updates checker function
on every run if data.yum_updates True we notify user over WebUI
Debugging with 20 secs sleep over data_collector, moving to 1 hour
Current "Avail yum updates icon" is Font Awesome 4.7 dashboard
(check other PR for FA 4.7 @schakrava)

Signed-off-by: Mirko Arena <mirko.arena@gmail.com>

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Apr 1, 2017

Yum reporting enhancement - ref #1619
yum_check update to return check-update rc and avail packages list
pkg_changelog new func:
reading package changelog via changelog 1 (grab only last changelog)
return a dict made of package name, current changelog and package update
changelog

Signed-off-by: Mirko Arena <mirko.arena@gmail.com>

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Apr 1, 2017

Ref #1619 - Changing animations from jquery to css
Signed-off-by: Mirko Arena <mirko.arena@gmail.com>

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Apr 1, 2017

Ref #1619 - Added missing data_collector packages param
Signed-off-by: Mirko Arena <mirko.arena@gmail.com>

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Apr 1, 2017

Adding Yum updates modal and its handler
Ref to #1619 - Added new modal over base.html static template
plus modal handler over router.js

Signed-off-by: Mirko Arena <mirko.arena@gmail.com>
@MFlyer

This comment has been minimized.

Show comment
Hide comment
@MFlyer

MFlyer Apr 1, 2017

Member

Hi @schakrava & @phillxnet ,
hope to close it by this week-end, but I'd like to have your opinions/suggestions:

Current "state of art" : yum updates available -> blinking icon on WebUI. Click on blinking icon -> bootstrap modal with full details on every package (current version, new version, last changelog - maybe adding package description too, got some inspirations from Proxmox update manager). Will provide some screenshots asap

Option A :
suggest users to open "system shell" via WebUI or ssh and have yum updates

Option B :
handle it all via WebUI and have yum updates from it with some frontend feedback (ex. like on log manager, live output from yum update)

Mirko

Member

MFlyer commented Apr 1, 2017

Hi @schakrava & @phillxnet ,
hope to close it by this week-end, but I'd like to have your opinions/suggestions:

Current "state of art" : yum updates available -> blinking icon on WebUI. Click on blinking icon -> bootstrap modal with full details on every package (current version, new version, last changelog - maybe adding package description too, got some inspirations from Proxmox update manager). Will provide some screenshots asap

Option A :
suggest users to open "system shell" via WebUI or ssh and have yum updates

Option B :
handle it all via WebUI and have yum updates from it with some frontend feedback (ex. like on log manager, live output from yum update)

Mirko

@phillxnet

This comment has been minimized.

Show comment
Hide comment
@phillxnet

phillxnet Apr 1, 2017

Member

@MFlyer I favour Option B, however since we already have your rather nice log viewer in place could the user not be directed/linked towards that to view logs, ie less duplication and hopefully simpler; and possibly only if there was an error for example. Obviously a live progress of the update would be the business but maybe that could be added by way of another enhancement pr. Especially if you are looking to bring this to a conclusion.

Reverting to terminal for anything seems like a defeat of appliance nature.

Member

phillxnet commented Apr 1, 2017

@MFlyer I favour Option B, however since we already have your rather nice log viewer in place could the user not be directed/linked towards that to view logs, ie less duplication and hopefully simpler; and possibly only if there was an error for example. Obviously a live progress of the update would be the business but maybe that could be added by way of another enhancement pr. Especially if you are looking to bring this to a conclusion.

Reverting to terminal for anything seems like a defeat of appliance nature.

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Apr 1, 2017

New pkg_infos function
Ref to #1619 - Adding new func to collect packages infos via rpm
To @schakrava : this can be useful with Rockstor updates checking
pkg_infos func read rpm pkg infos via queryformat, here with DESCRIPTION
field to provide frontend infos about packages with updates

Signed-off-by: Mirko Arena <mirko.arena@gmail.com>

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Apr 2, 2017

Backend & Frontend enhancements
Ref #1619 - pkg management partial rewrite plus bootstrap accordion
pkg_changelog from system/pkg_mgmt now returns changelogs joined with
a custom [line] tag, this let us escape strings on frontend and avoid
a loop over array - using instead a regexp replace
base.html and router.js now handle received packages list, building a
bootstrap accordion with panel title to package name, panel body to changelogs,
panel footer to package description

Signed-off-by: Mirko Arena <mirko.arena@gmail.com>
@MFlyer

This comment has been minimized.

Show comment
Hide comment
@MFlyer

MFlyer Apr 2, 2017

Member

On 59c1c47 we have some code I already had (and flushed while having some tests xD)

Starting with some screenshots:

Yum notification
available updates

Yum packages modal with bootstrap accordion closed
accordion closed

Bootstrap accordion with package infos (name, changelog and description)
accordion open

Member

MFlyer commented Apr 2, 2017

On 59c1c47 we have some code I already had (and flushed while having some tests xD)

Starting with some screenshots:

Yum notification
available updates

Yum packages modal with bootstrap accordion closed
accordion closed

Bootstrap accordion with package infos (name, changelog and description)
accordion open

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Apr 3, 2017

Handling Yum update process trying to to id the smart way!:)
Ref #1619 - Plan is not to lock user to yum updates screen,
so we perform updates using current pkg_mgmt and commands.py funcs/command
update command recognizes yum updates, having a request.auth - from data_collector
APIWrapper vs WebUI update (Rockstor Update) without it
Back to System pkg_mgmt we use same update_run func with a flag parameter
yum_updates

Signed-off-by: Mirko Arena <mirko.arena@gmail.com>

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Apr 3, 2017

Ref #1619 - Using same filter on Rockstor package rock*
Signed-off-by: Mirko Arena <mirko.arena@gmail.com>

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Apr 3, 2017

Fixes #1689 and add data_collector yum updates skeleton
Ref to #1619 and #1689
Fixed a small regression after flake8 rounds plus partially added
data_collector backend for yum updates

Signed-off-by: Mirko Arena <mirko.arena@gmail.com>

MFlyer added a commit to MFlyer/rockstor-core that referenced this issue Apr 3, 2017

Last on #1619 - small flake8 on data_collector
Signed-off-by: Mirko Arena <mirko.arena@gmail.com>

@schakrava schakrava closed this in ee28271 Apr 14, 2017

@schakrava schakrava added the Feature label Apr 15, 2017

@schakrava schakrava changed the title from [New Feature] Add Yum capabilities to System updates to Add Yum capabilities to System updates Jul 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment