You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2019/03/01 14:55:36 UTC

[GitHub] ustcweizhou commented on issue #3179: Redundant VRouter guest network on wrong interface

ustcweizhou commented on issue #3179: Redundant VRouter guest network on wrong interface
URL: https://github.com/apache/cloudstack/issues/3179#issuecomment-468691499
 
 
   @DennisKonrad 
   when apply a new configuration in VR, it will create a file in VR and execute the update in VR.
   see code in ./core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java below
   ```
       private ExecutionResult applyConfigToVR(String routerAccessIp, ConfigItem c, Duration timeout) {
           if (c instanceof FileConfigItem) {
               FileConfigItem configItem = (FileConfigItem)c;
               return _vrDeployer.createFileInVR(routerAccessIp, configItem.getFilePath(), configItem.getFileName(), configItem.getFileContents());
           } else if (c instanceof ScriptConfigItem) {
               ScriptConfigItem configItem = (ScriptConfigItem)c;
               return _vrDeployer.executeInVR(routerAccessIp, configItem.getScript(), configItem.getArgs(), timeout);
           }
           throw new CloudRuntimeException("Unable to apply unknown configitem of type " + c.getClass().getSimpleName());
       }
   ```
   
   json files will be created in server, then scp to VR through 169.254.X.X/port 3922 on VR.
   then execute /opt/cloud/bin/update_config.py in VR
   json file will be processed in following part
   ```
   def process_file():
       logging.info("Processing JSON file %s" % sys.argv[1])
       qf = QueueFile()
       qf.setFile(sys.argv[1])
       qf.load(None)
   ```
   QueueFile is defined in /opt/cloud/bin/merge.py
   ips.json will be updated if json file contains new ip.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services