diff --git a/python/vm/create_scvm_xml.py b/python/vm/create_scvm_xml.py index f0bcff9b..b5e43dd6 100644 --- a/python/vm/create_scvm_xml.py +++ b/python/vm/create_scvm_xml.py @@ -35,8 +35,8 @@ def createArgumentParser(): parser.add_argument('-c', '--cpu', metavar='[cpu cores]', type=int, help='input Value to cpu cores', required=True) parser.add_argument('-m', '--memory', metavar='[memory gb]', type=int, help='input Value to memory GB', required=True) - #--disk-type { raid_passthrough or lun_passthrough } | 1택, 선택, 필수 - parser.add_argument('-dt', '--disk-type', metavar='[raid_passthrough or lun_passthrough]', choices=['raid_passthrough', 'lun_passthrough'], type=str, help='storage center VM disk type choice', required=True) + #--disk-type { raid_passthrough or lun_passthrough or disk_passthrough } | 1택, 선택, 필수 + parser.add_argument('-dt', '--disk-type', metavar='[raid_passthrough or lun_passthrough or disk_passthrough]', choices=['raid_passthrough', 'lun_passthrough', 'disk_passthrough'], type=str, help='storage center VM disk type choice', required=True) #--raid-passthrough-list raid1 raid2 | 다중선택, 조건부 필수 (disk-type가 raid_passthrough 일 경우) parser.add_argument('-rpl', '--raid-passthrough-list', metavar='[raid pci]', type=str, nargs='+', help='input Value to raid pic list') @@ -44,6 +44,9 @@ def createArgumentParser(): #--lun-passthrough-list disk1 disk2 | 다중선택, 조건부 필수 (disk-type가 lun_passthrough 일 경우) parser.add_argument('-lpl', '--lun-passthrough-list', metavar='[lum]', type=str, nargs='+', help='input Value to LUN list') + # --disk-passthrough-list disk1 disk2 | 다중선택, 조건부 필수 (disk-type가 disk_passthrough 일 경우) + parser.add_argument('-dpl', '--disk-passthrough-list', metavar='[disk]', type=str, nargs='+', help='input Value to disk list') + #--management-network-bridge br0 | 1택, 필수 parser.add_argument('-mnb', '--management-network-bridge', metavar='[bridge name]', type=str, help='input Value to bridge name of the management network', required=True) @@ -163,6 +166,19 @@ def createScvmXml(args): num += 1 line = line.replace('', lpl_txt) + elif 'disk_passthrough' == args.disk_type: + dpl_txt = "" + num = 0 + for disk in args.disk_passthrough_list: + dpl_txt += " \n" + dpl_txt += " \n" + dpl_txt += " \n" + dpl_txt += " \n" + dpl_txt += " \n" + dpl_txt += "
\n" + dpl_txt += " \n" + num += 1 + line = line.replace('', dpl_txt) else: # 주석제거 line = '' diff --git a/shell/host/security_patch.sh b/shell/host/security_patch.sh index e027b3b7..f1e2d5bc 100755 --- a/shell/host/security_patch.sh +++ b/shell/host/security_patch.sh @@ -86,7 +86,7 @@ update_ssh_scan_port() { #====================[ firewalld 서비스 보장 ]====================# ensure_firewalld() { - # firewall-cmd가 없으면 firewalld도 없다고 보고 스킵 + # firewall-cmd가 없으면 firewalld도 없다고 보고 스킵합니다. if ! command -v firewall-cmd >/dev/null 2>&1; then return 0 fi @@ -96,16 +96,24 @@ ensure_firewalld() { return 0 fi + # inactive(dead), failed 상태이면 firewalld를 시작합니다. if ! systemctl is-active --quiet firewalld 2>/dev/null; then echo "[INFO] firewalld 서비스가 비활성화되어 있어 시작합니다." + if systemctl start firewalld 2>/dev/null; then - echo "[INFO] firewalld 시작 완료" + if systemctl is-active --quiet firewalld 2>/dev/null; then + echo "[INFO] firewalld 시작 완료" + else + echo "[WARN] firewalld start 명령은 성공했지만 active 상태가 아닙니다. 계속 진행합니다." + return 0 + fi else echo "[WARN] firewalld 시작 실패 또는 서비스 없음. 계속 진행합니다." return 0 fi fi + # 부팅 시 자동 시작 설정입니다. if ! systemctl is-enabled --quiet firewalld 2>/dev/null; then if systemctl enable firewalld >/dev/null 2>&1; then echo "[INFO] firewalld enable 완료" @@ -113,6 +121,19 @@ ensure_firewalld() { echo "[WARN] firewalld enable 실패. 계속 진행합니다." fi fi + + # 혹시 모를 상태 반영 문제를 방지하기 위해 마지막에 재시작합니다. + echo "[INFO] firewalld 서비스를 재시작합니다." + + if systemctl restart firewalld 2>/dev/null; then + if systemctl is-active --quiet firewalld 2>/dev/null; then + echo "[INFO] firewalld 재시작 완료" + else + echo "[WARN] firewalld restart 명령은 성공했지만 active 상태가 아닙니다. 계속 진행합니다." + fi + else + echo "[WARN] firewalld 재시작 실패. 계속 진행합니다." + fi } ensure_firewalld diff --git a/src/features/storage-vm-wizard.html b/src/features/storage-vm-wizard.html index 625f56ad..05869ee8 100644 --- a/src/features/storage-vm-wizard.html +++ b/src/features/storage-vm-wizard.html @@ -201,6 +201,10 @@

스토리지센터 가 +
+ + +
diff --git a/src/features/storage-vm-wizard.js b/src/features/storage-vm-wizard.js index 11e55c22..230a2af6 100644 --- a/src/features/storage-vm-wizard.js +++ b/src/features/storage-vm-wizard.js @@ -813,7 +813,7 @@ function showDivisionVMConfigFinish() { function setDiskInfo(){ var cmd = ["python3",pluginpath + "/python/disk/disk_action.py","list"]; - // rp = raid passthrough, lp = lun passthrough + // rp = raid passthrough, lp = lun passthrough, dp = disk passthrough disk_setup_type = $('input[name="form-radio-storage-vm-disk-type"]:checked').val() createLoggerInfo("setDiskInfo() start"); @@ -981,7 +981,7 @@ function setReviewInfo(){ $('#span-storage-vm-memory').text(memory_txt); } - //디스크 구성 ( rp = RAID Passthrough, lp = LUN Passthrough ) + //디스크 구성 ( rp = RAID Passthrough, lp = LUN Passthrough, dp = Disk Passthrough ) var svdt = $('input[type=radio][name=form-radio-storage-vm-disk-type]:checked').val(); if(svdt == 'rp') { xml_create_cmd.push("-dt","raid_passthrough"); @@ -989,6 +989,9 @@ function setReviewInfo(){ } else if(svdt == 'lp') { xml_create_cmd.push("-dt","lun_passthrough"); xml_create_cmd.push("-lpl"); + } else if(svdt == 'dp') { + xml_create_cmd.push("-dt","disk_passthrough"); + xml_create_cmd.push("-dpl"); } $('#span-storage-vm-data-disk').empty(); @@ -999,6 +1002,8 @@ function setReviewInfo(){ el += "RAID Passthrough : " + $('label[for="'+this.id+'"]').text()+"
"; } else if(svdt == 'lp') { el += "LUN Passthrough : " + $('label[for="'+this.id+'"]').text()+"
"; + } else if(svdt == 'dp') { + el += "Disk Passthrough : " + $('label[for="'+this.id+'"]').text()+"
"; } $('#span-storage-vm-data-disk').append(el); xml_create_cmd.push(this.value);