Skip to content

Commit

Permalink
Merge the tip of origin/release/proposed/2019.2.0 into origin/release…
Browse files Browse the repository at this point in the history
…/2019.2.0

6fb7a50 Use local pip storage for offline deploy
406b58a [ceph] fix issue with upmap used for adding missing osd

Change-Id: Ic90b99702ed460714a1d9301a3ae3183dfd5092a
  • Loading branch information
MCP Jenkins committed Mar 5, 2022
2 parents c0bb38f + 6fb7a50 commit 1ee9327
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
13 changes: 9 additions & 4 deletions src/com/mirantis/mk/Ceph.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,15 @@ def generateMapping(pgmap,map) {
for(pg in pgmap) {
pg_new = pg["up"].minus(pg["acting"])
pg_old = pg["acting"].minus(pg["up"])
for(int i = 0; i < pg_new.size(); i++) {
// def string = "ceph osd pg-upmap-items " + pg["pgid"].toString() + " " + pg_new[i] + " " + pg_old[i] + ";"
def string = "ceph osd pg-upmap-items ${pg["pgid"]} ${pg_new[i]} ${pg_old[i]}"
map.add(string)
if(pg_old.isEmpty()) {
// use standard rebalancing to just fill gaps with new osds
unsetFlags('norebalance')
}
else {
for(int i = 0; i < pg_new.size(); i++) {
def string = "ceph osd pg-upmap-items ${pg["pgid"]} ${pg_new[i]} ${pg_old[i]}"
map.add(string)
}
}
}
}
Expand Down
7 changes: 6 additions & 1 deletion src/com/mirantis/mk/Python.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ def setupVirtualenv(path, python = 'python2', reqs=[], reqs_path=null, clean=fal
writeFile file: "${path}/requirements.txt", text: args
reqs_path = "${path}/requirements.txt"
}
runVirtualenvCommand(path, "pip install -r ${reqs_path}", true)

def install_cmd = 'pip install'
if (offlineDeployment) {
install_cmd += " --find-links=/opt/pip-mirror "
}
runVirtualenvCommand(path, "${install_cmd} -r ${reqs_path}", true)
}

/**
Expand Down

0 comments on commit 1ee9327

Please sign in to comment.