Skip to content

Commit

Permalink
Skip upgrade if target version same (#51)
Browse files Browse the repository at this point in the history
Skip re-installing software if target version matches with installed
version on firewall.
This also allows upgrading a partially upgraded HA pair if upgrade
playbook failed after upgrading a peer.
Also fixes a bug in FilterAvailableSoftwareImages script where
it fails to return newer hotfix versions because of float comparison.
  • Loading branch information
alperenkose authored Oct 22, 2024
1 parent dbd4e24 commit 3585261
Show file tree
Hide file tree
Showing 3 changed files with 184 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ tasks:
wait: 1
nexttasks:
'#none#':
- "62"
- "68"
note: false
quietmode: 0
scriptarguments:
Expand Down Expand Up @@ -289,7 +289,7 @@ tasks:
{
"position": {
"x": 520,
"y": -1370
"y": -1170
}
}
"62":
Expand Down Expand Up @@ -337,7 +337,7 @@ tasks:
{
"position": {
"x": 520,
"y": -1550
"y": -1330
}
}
"63":
Expand Down Expand Up @@ -400,8 +400,7 @@ tasks:
skipunavailable: false
task:
brand: ""
description: 'This will set the Panorama instance field (panosnetworkoperationspanoramainstance)
if it isn''t already set. '
description: "This will set the Panorama instance field (panosnetworkoperationspanoramainstance) if it isn't already set. "
id: d9814a7d-ab6a-4a7d-8a00-4835e6f58a06
iscommand: false
name: Set Panorama Instance
Expand All @@ -418,14 +417,86 @@ tasks:
"y": -1930
}
}
version: 10
"68":
conditions:
- condition:
- - left:
iscontext: true
value:
simple: incident.upgradepath
operator: isNotEmpty
label: yes
continueonerrortype: ""
id: "68"
ignoreworker: false
isautoswitchedtoquietmode: false
isoversize: false
nexttasks:
'#default#':
- "69"
yes:
- "62"
note: false
quietmode: 0
separatecontext: false
skipunavailable: false
task:
brand: ""
id: c85aeeab-1823-426f-8828-c8303f531d6b
iscommand: false
name: Is upgrade path set?
type: condition
version: -1
taskid: c85aeeab-1823-426f-8828-c8303f531d6b
timertriggers: []
type: condition
view: |-
{
"position": {
"x": 520,
"y": -1540
}
}
"69":
continueonerrortype: ""
id: "69"
ignoreworker: false
isautoswitchedtoquietmode: false
isoversize: false
note: false
quietmode: 0
scriptarguments:
message:
simple: No upgradepath set, make sure to select an higher PAN-OS version than the target firewall; or if you are upgrading a partially upgraded HA pair, target firewall with the lower version.
separatecontext: false
skipunavailable: false
task:
brand: ""
description: Prints an error entry with a given message
id: 340aeda1-f805-49e6-80ef-dd86d0fbf796
iscommand: false
name: No Upgrade Path Found.
script: PrintErrorEntry
type: regular
version: -1
taskid: 340aeda1-f805-49e6-80ef-dd86d0fbf796
timertriggers: []
type: regular
view: |-
{
"position": {
"x": 980,
"y": -1330
}
}
version: 11
view: |-
{
"linkLabelsPosition": {},
"paper": {
"dimensions": {
"height": 1765,
"width": 610,
"height": 1965,
"width": 840,
"x": 520,
"y": -3070
}
Expand Down
Loading

0 comments on commit 3585261

Please sign in to comment.