Add description of os_mount field in job.yaml.
Signed-off-by: Yu Chuan 13186087857@163.com --- doc/job/os_mount.md | 62 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 doc/job/os_mount.md
diff --git a/doc/job/os_mount.md b/doc/job/os_mount.md new file mode 100644 index 000000000000..a4d832e07955 --- /dev/null +++ b/doc/job/os_mount.md @@ -0,0 +1,62 @@ +# Summary +========= + +`os_mount` defines the mount method of tbox's root partition. + +It has the following optional values: + - nfs + - cifs + - initramfs + - container + - local + +Usage example: + - submit iperf.yaml testbox=vm-2p8g os_mount=nfs + - submit iperf.yaml testbox=vm-2p8g os_mount=cifs + - submit iperf.yaml testbox=vm-2p8g os_mount=initramfs + - submit iperf.yaml testbox=vm-2p8g os_mount=container + - submit iperf.yaml testbox=vm-2p8g os_mount=local + +# Optional Values +================= + +## Work flow when os_mount=local + +1. user submit job with os_mount: local + optional kernel cmdline params: # can be added in kernel_append_root field of job.yaml + - keep_last_root: keep the original data of disk what last job generated, don't wipe it + +2. scheduler return the ipxe_str to tbox + ``` + dhcp + initrd http://$%7Bhttp_server_ip%7D:$%7Bhttp_server_port%7D/os/openeuler/aarch64/20... + initrd http://$%7Bhttp_server_ip%7D:$%7Bhttp_server_port%7D/os/openeuler/aarch64/20... + imgargs vmlinux root=/dev/mapper/os-openeuler_aarch64_20.03 rootfs_src={nfs_server_ip}:os/openeuler/aarch64/20.03-iso-snapshots/{timestamp} initrd=initrd.lkp {kernel_append_root} + boot + ``` + +3. boot + - check if `/dev/mapper/os-openeuler_aarch64_20.03_{timestamp}` exist # according the kernel cmdline + - if exist: + - if `keep_last_root` not in kernel cmdline params: + - re-create(lvremove and lvcreate) lvm rw snapshot /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} + - boot from /dev/mapper/os-openeuler_aarch64_20.03 + - if `keep_last_root` in kernel cmdline params: + - if /dev/mapper/os-openeuler_aarch64_20.03 exists: + - boot from /dev/mapper/os-openeuler_aarch64_20.03 + - if /dev/mapper/os-openeuler_aarch64_20.03 not exists: + - generate /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03-{timestamp} + - boot from /dev/mapper/os-openeuler_aarch64_20.03 + - if not exist: + ``` + mount -t nfs {nfs_server_ip}:os/openeuler/aarch64/20.03-iso-snapshots/{timestamp} /mnt + create /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} according rootfs_disk. # lvm size: 10G + mkdir /mnt1, mount /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} /mnt1 + rsync -az /mnt/. /mnt1/ + umount /mnt /mnt1 + lvchange -p r /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} + create lvm rw snapshot /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} + boot from /dev/mapper/os-openeuler_aarch64_20.03 + ``` + +4. execute the job
On Tue, Feb 02, 2021 at 04:13:45PM +0800, Yu Chuan wrote:
Add description of os_mount field in job.yaml.
Signed-off-by: Yu Chuan 13186087857@163.com
doc/job/os_mount.md | 62 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 doc/job/os_mount.md
diff --git a/doc/job/os_mount.md b/doc/job/os_mount.md new file mode 100644 index 000000000000..a4d832e07955 --- /dev/null +++ b/doc/job/os_mount.md @@ -0,0 +1,62 @@ +# Summary +=========
+`os_mount` defines the mount method of tbox's root partition.
+It has the following optional values:
- nfs
- cifs
- initramfs
- container
- local
+Usage example:
- submit iperf.yaml testbox=vm-2p8g os_mount=nfs
- submit iperf.yaml testbox=vm-2p8g os_mount=cifs
- submit iperf.yaml testbox=vm-2p8g os_mount=initramfs
- submit iperf.yaml testbox=vm-2p8g os_mount=container
testbox=dc-8g os_mount=container
Thanks, Shenwei
- submit iperf.yaml testbox=vm-2p8g os_mount=local
+# Optional Values +=================
+## Work flow when os_mount=local
+1. user submit job with os_mount: local
- optional kernel cmdline params: # can be added in kernel_append_root field of job.yaml
- keep_last_root: keep the original data of disk what last job generated, don't wipe it
+2. scheduler return the ipxe_str to tbox
- dhcp
- initrd http://$%7Bhttp_server_ip%7D:$%7Bhttp_server_port%7D/os/openeuler/aarch64/20...
- initrd http://$%7Bhttp_server_ip%7D:$%7Bhttp_server_port%7D/os/openeuler/aarch64/20...
- imgargs vmlinux root=/dev/mapper/os-openeuler_aarch64_20.03 rootfs_src={nfs_server_ip}:os/openeuler/aarch64/20.03-iso-snapshots/{timestamp} initrd=initrd.lkp {kernel_append_root}
- boot
+3. boot
- check if `/dev/mapper/os-openeuler_aarch64_20.03_{timestamp}` exist # according the kernel cmdline
- if exist:
- if `keep_last_root` not in kernel cmdline params:
- re-create(lvremove and lvcreate) lvm rw snapshot /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03_{timestamp}
- boot from /dev/mapper/os-openeuler_aarch64_20.03
- if `keep_last_root` in kernel cmdline params:
- if /dev/mapper/os-openeuler_aarch64_20.03 exists:
- boot from /dev/mapper/os-openeuler_aarch64_20.03
- if /dev/mapper/os-openeuler_aarch64_20.03 not exists:
- generate /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03-{timestamp}
- boot from /dev/mapper/os-openeuler_aarch64_20.03
- if not exist:
- mount -t nfs {nfs_server_ip}:os/openeuler/aarch64/20.03-iso-snapshots/{timestamp} /mnt
- create /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} according rootfs_disk. # lvm size: 10G
- mkdir /mnt1, mount /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} /mnt1
- rsync -az /mnt/. /mnt1/
- umount /mnt /mnt1
- lvchange -p r /dev/mapper/os-openeuler_aarch64_20.03_{timestamp}
- create lvm rw snapshot /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03_{timestamp}
- boot from /dev/mapper/os-openeuler_aarch64_20.03
+4. execute the job
2.23.0
On Tue, Feb 02, 2021 at 04:15:22PM +0800, Xiao Shenwei wrote:
On Tue, Feb 02, 2021 at 04:13:45PM +0800, Yu Chuan wrote:
Add description of os_mount field in job.yaml.
Signed-off-by: Yu Chuan 13186087857@163.com
doc/job/os_mount.md | 62 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 doc/job/os_mount.md
diff --git a/doc/job/os_mount.md b/doc/job/os_mount.md new file mode 100644 index 000000000000..a4d832e07955 --- /dev/null +++ b/doc/job/os_mount.md @@ -0,0 +1,62 @@ +# Summary +=========
+`os_mount` defines the mount method of tbox's root partition.
+It has the following optional values:
- nfs
- cifs
- initramfs
- container
- local
+Usage example:
- submit iperf.yaml testbox=vm-2p8g os_mount=nfs
- submit iperf.yaml testbox=vm-2p8g os_mount=cifs
- submit iperf.yaml testbox=vm-2p8g os_mount=initramfs
- submit iperf.yaml testbox=vm-2p8g os_mount=container
testbox=dc-8g os_mount=container
good. my mistake.
-------- Thanks Yu Chuan
Thanks, Shenwei
- submit iperf.yaml testbox=vm-2p8g os_mount=local
+# Optional Values +=================
+## Work flow when os_mount=local
+1. user submit job with os_mount: local
- optional kernel cmdline params: # can be added in kernel_append_root field of job.yaml
- keep_last_root: keep the original data of disk what last job generated, don't wipe it
+2. scheduler return the ipxe_str to tbox
- dhcp
- initrd http://$%7Bhttp_server_ip%7D:$%7Bhttp_server_port%7D/os/openeuler/aarch64/20...
- initrd http://$%7Bhttp_server_ip%7D:$%7Bhttp_server_port%7D/os/openeuler/aarch64/20...
- imgargs vmlinux root=/dev/mapper/os-openeuler_aarch64_20.03 rootfs_src={nfs_server_ip}:os/openeuler/aarch64/20.03-iso-snapshots/{timestamp} initrd=initrd.lkp {kernel_append_root}
- boot
+3. boot
- check if `/dev/mapper/os-openeuler_aarch64_20.03_{timestamp}` exist # according the kernel cmdline
- if exist:
- if `keep_last_root` not in kernel cmdline params:
- re-create(lvremove and lvcreate) lvm rw snapshot /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03_{timestamp}
- boot from /dev/mapper/os-openeuler_aarch64_20.03
- if `keep_last_root` in kernel cmdline params:
- if /dev/mapper/os-openeuler_aarch64_20.03 exists:
- boot from /dev/mapper/os-openeuler_aarch64_20.03
- if /dev/mapper/os-openeuler_aarch64_20.03 not exists:
- generate /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03-{timestamp}
- boot from /dev/mapper/os-openeuler_aarch64_20.03
- if not exist:
- mount -t nfs {nfs_server_ip}:os/openeuler/aarch64/20.03-iso-snapshots/{timestamp} /mnt
- create /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} according rootfs_disk. # lvm size: 10G
- mkdir /mnt1, mount /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} /mnt1
- rsync -az /mnt/. /mnt1/
- umount /mnt /mnt1
- lvchange -p r /dev/mapper/os-openeuler_aarch64_20.03_{timestamp}
- create lvm rw snapshot /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03_{timestamp}
- boot from /dev/mapper/os-openeuler_aarch64_20.03
+4. execute the job
2.23.0
On Tue, Feb 02, 2021 at 04:13:45PM +0800, Yu Chuan wrote:
Add description of os_mount field in job.yaml.
Why here only have local mount?
Thanks, Xijian
Signed-off-by: Yu Chuan 13186087857@163.com
doc/job/os_mount.md | 62 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 doc/job/os_mount.md
diff --git a/doc/job/os_mount.md b/doc/job/os_mount.md new file mode 100644 index 000000000000..a4d832e07955 --- /dev/null +++ b/doc/job/os_mount.md @@ -0,0 +1,62 @@ +# Summary +=========
+`os_mount` defines the mount method of tbox's root partition.
+It has the following optional values:
- nfs
- cifs
- initramfs
- container
- local
+Usage example:
- submit iperf.yaml testbox=vm-2p8g os_mount=nfs
- submit iperf.yaml testbox=vm-2p8g os_mount=cifs
- submit iperf.yaml testbox=vm-2p8g os_mount=initramfs
- submit iperf.yaml testbox=vm-2p8g os_mount=container
- submit iperf.yaml testbox=vm-2p8g os_mount=local
+# Optional Values +=================
+## Work flow when os_mount=local
+1. user submit job with os_mount: local
- optional kernel cmdline params: # can be added in kernel_append_root field of job.yaml
- keep_last_root: keep the original data of disk what last job generated, don't wipe it
+2. scheduler return the ipxe_str to tbox
- dhcp
- initrd http://$%7Bhttp_server_ip%7D:$%7Bhttp_server_port%7D/os/openeuler/aarch64/20...
- initrd http://$%7Bhttp_server_ip%7D:$%7Bhttp_server_port%7D/os/openeuler/aarch64/20...
- imgargs vmlinux root=/dev/mapper/os-openeuler_aarch64_20.03 rootfs_src={nfs_server_ip}:os/openeuler/aarch64/20.03-iso-snapshots/{timestamp} initrd=initrd.lkp {kernel_append_root}
- boot
+3. boot
- check if `/dev/mapper/os-openeuler_aarch64_20.03_{timestamp}` exist # according the kernel cmdline
- if exist:
- if `keep_last_root` not in kernel cmdline params:
- re-create(lvremove and lvcreate) lvm rw snapshot /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03_{timestamp}
- boot from /dev/mapper/os-openeuler_aarch64_20.03
- if `keep_last_root` in kernel cmdline params:
- if /dev/mapper/os-openeuler_aarch64_20.03 exists:
- boot from /dev/mapper/os-openeuler_aarch64_20.03
- if /dev/mapper/os-openeuler_aarch64_20.03 not exists:
- generate /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03-{timestamp}
- boot from /dev/mapper/os-openeuler_aarch64_20.03
- if not exist:
- mount -t nfs {nfs_server_ip}:os/openeuler/aarch64/20.03-iso-snapshots/{timestamp} /mnt
- create /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} according rootfs_disk. # lvm size: 10G
- mkdir /mnt1, mount /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} /mnt1
- rsync -az /mnt/. /mnt1/
- umount /mnt /mnt1
- lvchange -p r /dev/mapper/os-openeuler_aarch64_20.03_{timestamp}
- create lvm rw snapshot /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03_{timestamp}
- boot from /dev/mapper/os-openeuler_aarch64_20.03
+4. execute the job
2.23.0
On Tue, Feb 02, 2021 at 04:16:34PM +0800, Xu Xijian wrote:
On Tue, Feb 02, 2021 at 04:13:45PM +0800, Yu Chuan wrote:
Add description of os_mount field in job.yaml.
Why here only have local mount?
Got it. This is the first version that only contain 'local', I forget to add description in changelog.
-------- Thanks Yu Chuan
Thanks, Xijian
Signed-off-by: Yu Chuan 13186087857@163.com
doc/job/os_mount.md | 62 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 doc/job/os_mount.md
diff --git a/doc/job/os_mount.md b/doc/job/os_mount.md new file mode 100644 index 000000000000..a4d832e07955 --- /dev/null +++ b/doc/job/os_mount.md @@ -0,0 +1,62 @@ +# Summary +=========
+`os_mount` defines the mount method of tbox's root partition.
+It has the following optional values:
- nfs
- cifs
- initramfs
- container
- local
+Usage example:
- submit iperf.yaml testbox=vm-2p8g os_mount=nfs
- submit iperf.yaml testbox=vm-2p8g os_mount=cifs
- submit iperf.yaml testbox=vm-2p8g os_mount=initramfs
- submit iperf.yaml testbox=vm-2p8g os_mount=container
- submit iperf.yaml testbox=vm-2p8g os_mount=local
+# Optional Values +=================
+## Work flow when os_mount=local
+1. user submit job with os_mount: local
- optional kernel cmdline params: # can be added in kernel_append_root field of job.yaml
- keep_last_root: keep the original data of disk what last job generated, don't wipe it
+2. scheduler return the ipxe_str to tbox
- dhcp
- initrd http://$%7Bhttp_server_ip%7D:$%7Bhttp_server_port%7D/os/openeuler/aarch64/20...
- initrd http://$%7Bhttp_server_ip%7D:$%7Bhttp_server_port%7D/os/openeuler/aarch64/20...
- imgargs vmlinux root=/dev/mapper/os-openeuler_aarch64_20.03 rootfs_src={nfs_server_ip}:os/openeuler/aarch64/20.03-iso-snapshots/{timestamp} initrd=initrd.lkp {kernel_append_root}
- boot
+3. boot
- check if `/dev/mapper/os-openeuler_aarch64_20.03_{timestamp}` exist # according the kernel cmdline
- if exist:
- if `keep_last_root` not in kernel cmdline params:
- re-create(lvremove and lvcreate) lvm rw snapshot /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03_{timestamp}
- boot from /dev/mapper/os-openeuler_aarch64_20.03
- if `keep_last_root` in kernel cmdline params:
- if /dev/mapper/os-openeuler_aarch64_20.03 exists:
- boot from /dev/mapper/os-openeuler_aarch64_20.03
- if /dev/mapper/os-openeuler_aarch64_20.03 not exists:
- generate /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03-{timestamp}
- boot from /dev/mapper/os-openeuler_aarch64_20.03
- if not exist:
- mount -t nfs {nfs_server_ip}:os/openeuler/aarch64/20.03-iso-snapshots/{timestamp} /mnt
- create /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} according rootfs_disk. # lvm size: 10G
- mkdir /mnt1, mount /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} /mnt1
- rsync -az /mnt/. /mnt1/
- umount /mnt /mnt1
- lvchange -p r /dev/mapper/os-openeuler_aarch64_20.03_{timestamp}
- create lvm rw snapshot /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03_{timestamp}
- boot from /dev/mapper/os-openeuler_aarch64_20.03
+4. execute the job
2.23.0