File tree 1 file changed +25
-0
lines changed
repos/system_upgrade/cloudlinux/actors/createfinishmarker
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ from datetime import datetime
2
+
3
+ from leapp .actors import Actor
4
+ from leapp .tags import FirstBootPhaseTag , IPUWorkflowTag
5
+ from leapp .libraries .common .cllaunch import run_on_cloudlinux
6
+
7
+
8
+ class CreateFinishMarker (Actor ):
9
+ """
10
+ Create a finish marker file to indicate that the upgrade has been completed.
11
+ Other utilities or tests can check for the existence of this file to determine if the upgrade has been completed.
12
+ """
13
+
14
+ name = 'create_finish_marker'
15
+ description = 'Create a finish marker file to indicate that the upgrade has been completed.'
16
+ consumes = ()
17
+ produces = ()
18
+ # Place this actor as far as possible in the workflow, after the absolute majority of other actors have run
19
+ tags = (FirstBootPhaseTag .After , IPUWorkflowTag )
20
+
21
+ @run_on_cloudlinux
22
+ def process (self ):
23
+ # Create a finish marker file to indicate that the upgrade has been completed
24
+ with open ('/var/log/leapp/leapp-upgrade-finished' , 'w' ) as marker_file :
25
+ marker_file .write ('Leapp upgrade completed on: {}\n ' .format (datetime .now ()))
You can’t perform that action at this time.
0 commit comments