修改私网的回退方案测试

2021-12-08 00:00:00 集群 专区 订阅 生产 节点

修改私网的恢复测试


当前私网配置


[grid@test1 peer]$ oifcfg getif

eth0  192.168.56.0  global  public

eth2  192.168.58.0  global  cluster_interconnect,asm

eth1  192.168.57.0  global  cluster_interconnect,asm

gpnp profie内容


[grid@test1 peer]$ gpnptool get

Warning: some command line parameters were defaulted. Resulting command line: 

         /oracle/asm/bin/gpnptool.bin get -o-


<?xml version="1.0" encoding="UTF-8"?><gpnp:GPnP-Profile Version="1.0" xmlns="http://www.grid-pnp.org/2005/11/gpnp-profile" xmlns:gpnp="http://www.grid-pnp.org/2005/11/gpnp-profile" xmlns:orcl="http://www.oracle.com/gpnp/2005/11/gpnp-profile" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.grid-pnp.org/2005/11/gpnp-profile gpnp-profile.xsd" ProfileSequence="22" ClusterUId="f455918d3186cf40bf7538fbb2f6f990" ClusterName="test-cluster" PALocation=""><gpnp:Network-Profile><gpnp:HostNetwork id="gen" HostName="*"><gpnp:Network id="net1" IP="192.168.56.0" Adapter="eth0" Use="public"/><gpnp:Network id="net3" Adapter="eth2" Use="cluster_interconnect,asm" IP="192.168.58.0"/><gpnp:Network id="net5" Adapter="eth1" Use="cluster_interconnect,asm" IP="192.168.57.0"/></gpnp:HostNetwork></gpnp:Network-Profile><orcl:CSS-Profile id="css" DiscoveryString="+asm" LeaseDuration="400"/><orcl:ASM-Profile id="asm" DiscoveryString="/dev/raw/*" SPFile="+ASMCRS/test-cluster/ASMPARAMETERFILE/registry.253.1000676357" Mode="legacy"/><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><ds:Reference URI=""><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"> <InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="gpnp orcl xsi"/></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><ds:DigestValue>R1WoUQOIl83Npcj/847NYT7VuQg=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>W93EZe/d7feZS/ANtG3IEkbnh5Lxj6+3UySZomtJpwYCjslEO0Sjgrm/i+dV6ZMJWKeOHK31EVtWeGkj+af3O9j79Nd80Gd3KBD+omOrxs//Jh7934my9xHOHicCizQOnukWQYak1dzquKI+Xqkd/tqNls1HH1DQpOUDMBD1Za0=</ds:SignatureValue></ds:Signature></gpnp:GPnP-Profile>

Success.


在两个节点备份profile.xml

节点1

[grid@test1 peer]$ ls -lrt

total 12

-rw-r--r-- 1 grid dba 1844 Feb 19  2019 profile_orig.xml

-rw-r--r-- 1 grid dba 2093 Dec  7 23:47 profile.old

-rw-r--r-- 1 grid dba 2004 Dec  8 00:06 profile.xml

[grid@test1 peer]$ cp profile.xml profile.xml20211208

[grid@test1 peer]$ ls -lrt

total 16

-rw-r--r-- 1 grid dba 1844 Feb 19  2019 profile_orig.xml

-rw-r--r-- 1 grid dba 2093 Dec  7 23:47 profile.old

-rw-r--r-- 1 grid dba 2004 Dec  8 00:06 profile.xml

-rw-r--r-- 1 grid dba 2004 Dec  8 00:17 profile.xml20211208



节点2类似操作


2 增加私网

[root@test2 peer]# oifcfg setif -global eth3/192.168.59.0:cluster_interconnect,asm

查看gpnp已经改了

[grid@test1 peer]$ gpnptool get

Warning: some command line parameters were defaulted. Resulting command line: 

         /oracle/asm/bin/gpnptool.bin get -o-


<?xml version="1.0" encoding="UTF-8"?><gpnp:GPnP-Profile Version="1.0" xmlns="http://www.grid-pnp.org/2005/11/gpnp-profile" xmlns:gpnp="http://www.grid-pnp.org/2005/11/gpnp-profile" xmlns:orcl="http://www.oracle.com/gpnp/2005/11/gpnp-profile" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.grid-pnp.org/2005/11/gpnp-profile gpnp-profile.xsd" ProfileSequence="23" ClusterUId="f455918d3186cf40bf7538fbb2f6f990" ClusterName="test-cluster" PALocation=""><gpnp:Network-Profile><gpnp:HostNetwork id="gen" HostName="*"><gpnp:Network id="net1" IP="192.168.56.0" Adapter="eth0" Use="public"/><gpnp:Network id="net3" Adapter="eth2" Use="cluster_interconnect,asm" IP="192.168.58.0"/><gpnp:Network id="net5" Adapter="eth1" Use="cluster_interconnect,asm" IP="192.168.57.0"/><gpnp:Network id="net4" Adapter="eth3" Use="cluster_interconnect,asm" IP="192.168.59.0"/></gpnp:HostNetwork></gpnp:Network-Profile><orcl:CSS-Profile id="css" DiscoveryString="+asm" LeaseDuration="400"/><orcl:ASM-Profile id="asm" DiscoveryString="/dev/raw/*" SPFile="+ASMCRS/test-cluster/ASMPARAMETERFILE/registry.253.1000676357" Mode="legacy"/><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><ds:Reference URI=""><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"> <InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="gpnp orcl xsi"/></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><ds:DigestValue>RrZif7iXxxCstHLz2E92dOWXt1A=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>hwc/izEnUbXVxKGFuU+oq8vk3EXkPUJi2opqYKcnX80PyCx+vk38GQ3hpvWWh8UonuZZIoJTnnFGlGzZhw9/KJCZdsUkz02M/jkCp/0eTRm1e8IqwrYq2UVK7ju6UrXilxCCXBZO8OJK5w6zt519lWNBzfEqT0wzbDo8vcI9qyc=</ds:SignatureValue></ds:Signature></gpnp:GPnP-Profile>

Success.



3 重启测试修改是否成功。

[root@test1 ~]# oifcfg getif

eth0  192.168.56.0  global  public

eth2  192.168.58.0  global  cluster_interconnect,asm

eth1  192.168.57.0  global  cluster_interconnect,asm

eth3  192.168.59.0  global  cluster_interconnect,asm


4关闭集群,恢复profile.xml 重启测试


此时profile会自动恢复到改动时的状态,所以此时必须通过oifcfg 指令修改回去,如果profile.xml文件异常,可以使用备份的文件


5回退方法

oifcfg delif -global eth3/192.168.59.0

重启集群

相关文章