Merge charm-hw-health:lp1943748 into charm-hw-health:master

Proposed by Facundo Ciccioli
Status: Merged
Approved by: James Troup
Approved revision: 11728de35fbae3bc94539e6b36d358169004e752
Merged at revision: d15f7f4d24880773b33c28f25fb7f163c102e6ba
Proposed branch: charm-hw-health:lp1943748
Merge into: charm-hw-health:master
Diff against target: 42 lines (+11/-2)
2 files modified
src/lib/hwhealth/tools.py (+10/-1)
src/tox.ini (+1/-1)
Reviewer Review Type Date Requested Status
John Lettman peer Approve
🤖 prod-jenkaas-bootstack (community) continuous-integration Approve
BootStack Reviewers Pending
BootStack Reviewers Pending
Review via email: mp+415040@code.launchpad.net

Commit message

Ensure libncurses5 is there for megacli

Description of the change

There two scenarios were tested:

1. On a focal deployment, refresh the charm. libncurses5 gets installed and megacli starts working.

2. On a bionic deployment, refresh the charm. Then upgrade to focal. libncurses5 is still installed and megacli works.

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :

A CI job is currently in progress. A follow up comment will be added when it completes.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :

A CI job is currently in progress. A follow up comment will be added when it completes.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
John Lettman (jplettman) wrote :

Approved on peer review. Changes function and resolve the referenced bug.

review: Approve (peer)
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision d15f7f4d24880773b33c28f25fb7f163c102e6ba

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/lib/hwhealth/tools.py b/src/lib/hwhealth/tools.py
2index b92ba15..4378b4f 100644
3--- a/src/lib/hwhealth/tools.py
4+++ b/src/lib/hwhealth/tools.py
5@@ -487,7 +487,8 @@ class AptVendorTool(Tool):
6 options=["--download-only" for _ in self.apt_packages],
7 )
8 else:
9- apt.queue_install(self.apt_packages)
10+ # NOTE: The options parameter is set explicitly to workaround LP#1959919.
11+ apt.queue_install(self.apt_packages, options=[])
12
13 def _add_apt_source(self):
14 series = lsb_release()["DISTRIB_CODENAME"]
15@@ -593,6 +594,14 @@ class MegaCLI(VendorTool):
16 "1a68e6646d1e3dfb7039f581be994500d0ed02de2f928e57399e86473d4c8662",
17 ]
18
19+ def install(self):
20+ # From focal onward we ship with libncurses6, megacli needs v5. On bionic and
21+ # previous the library is already installed, so this is a noop there.
22+ # LP#1943748
23+ # NOTE: The options parameter is set explicitly to workaround LP#1959919.
24+ apt.queue_install(["libncurses5"], options=[])
25+ super().install()
26+
27
28 class PercCLI(VendorTool):
29 """A class representing the perccli tool.
30diff --git a/src/tox.ini b/src/tox.ini
31index 7da331e..b392f62 100644
32--- a/src/tox.ini
33+++ b/src/tox.ini
34@@ -25,7 +25,7 @@ passenv =
35 [testenv:lint]
36 commands =
37 flake8
38- black --check --exclude "/(\.eggs|\.git|\.tox|\.venv|\.build|dist|charmhelpers|mod)/" .
39+ black --diff --exclude "/(\.eggs|\.git|\.tox|\.venv|\.build|dist|charmhelpers|mod)/" .
40 deps =
41 black
42 flake8

Subscribers

No one subscribed via source and target branches