File tree Expand file tree Collapse file tree 3 files changed +11
-55
lines changed
var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks Expand file tree Collapse file tree 3 files changed +11
-55
lines changed Original file line number Diff line number Diff line change 1717
1818case $1 in
1919upgrade)
20- # Checking the fstab file if the /export/home entry
21- # is present in the /etc/fstab, In case of container
22- # upgrade the file is already changed by the
23- # container-upgrade script and we dont need to do
24- # it again.
20+ # Home directories were previously mounted under /export/home,
21+ # and this was changed to /home. This is the upgrade logic that
22+ # updates the /etc/fstab file to reflect that change.
23+ # Home directories will be mounted in both /export/home and /home
24+ # until the system is rebooted to ensure that running processes
25+ # referencing the old /export/home paths continue to function
26+ # while also enabling new logins under /home to work.
2527 fs_tab=/etc/fstab
2628 auto_master=/etc/auto.master
2729
Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ Before=rsync.service docker.service
2424Type =oneshot
2525ExecStart =/var/lib/delphix-platform/ansible/apply
2626ExecStart =/var/lib/delphix-platform/dynamic-debug
27+
28+ # Create /export/home symlink to /home if it doesn't already exist
29+ ExecStartPost =/bin/sh -c '[ -L /export/home ] || ln -s /home /export/home'
30+
2731RemainAfterExit =yes
2832
2933#
Original file line number Diff line number Diff line change 684684 path : /etc/environment
685685 state : absent
686686 regexp : ' ^\s*PATH\s*='
687-
688- #
689- # Soft link creation in case it doesn't exist
690- #
691- - name : Check export
692- ansible.builtin.stat :
693- path : /export
694- register : export_status
695-
696- - name : Check export home
697- ansible.builtin.stat :
698- path : /export/home
699- when : export_status.stat.exists and export_status.stat.isdir
700- register : export_home_status
701-
702- #
703- # Before deleting the /export/home directory if the
704- # home data set is mounted on /export/home if its
705- # mounted remove if first and then go ahead.
706- #
707- - name : Check if the path is mounted
708- ansible.builtin.shell : |
709- mount | grep /export/home
710- register : mount_status
711- ignore_errors : yes
712-
713- - name : Unmount the path if it is mounted
714- ansible.builtin.mount :
715- path : /export/home
716- state : unmounted
717- when : mount_status.rc == 0
718-
719- - name : Delete home directory
720- ansible.builtin.file :
721- path : /export/home
722- state : absent
723- when : not export_status.stat.exists or export_home_status.stat.exists and export_home_status.stat.isdir
724-
725- - name : Create export directory
726- ansible.builtin.file :
727- path : /export
728- state : directory
729- mode : 0755
730- when : not export_status.stat.exists
731-
732- - name : Create the soft link
733- ansible.builtin.file :
734- src : /home
735- dest : /export/home
736- state : link
You can’t perform that action at this time.
0 commit comments