Github user remibergsma commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1346#discussion_r50251745
  
    --- Diff: systemvm/patches/debian/config/opt/cloud/bin/configure.py ---
    @@ -901,79 +901,123 @@ def processStaticNatRule(self, rule):
     
     
     def main(argv):
    +    # The file we are currently processing, if it is "cmd_line.json" 
everything will be processed.
    +    process_file = argv[1]
    +
    +    # process_file can be None, if so assume cmd_line.json
    +    if process_file is None:
    +        process_file = "cmd_line.json"
    +
    +    # Track if changes need to be committed to NetFilter
    +    iptables_change = False
    +
    +    # The "GLOBAL" Configuration object
         config = CsConfig()
    +
         logging.basicConfig(filename=config.get_logger(),
                             level=config.get_level(),
                             format=config.get_format())
    +
    +    # Load stored ip adresses from disk to CsConfig()
         config.set_address()
     
         logging.debug("Configuring ip addresses")
    -    # IP configuration
         config.address().compare()
         config.address().process()
     
    -    logging.debug("Configuring vmpassword")
    -    password = CsPassword("vmpassword", config)
    -    password.process()
    +    if process_file in ["cmd_line.json", "guest_network.json"]:
    +        logging.debug("Configuring Guest Network")
    +        iptables_change = True
    +
    +    if process_file in ["cmd_line.json", "vm_password.json"]:
    +        logging.debug("Configuring vmpassword")
    +        password = CsPassword("vmpassword", config)
    +        password.process()
     
    -    logging.debug("Configuring vmdata")
    -    metadata = CsVmMetadata('vmdata', config)
    -    metadata.process()
    +    if process_file in ["cmd_line.json", "vm_metadata.json"]:
    +        logging.debug("Configuring vmdata")
    +        metadata = CsVmMetadata('vmdata', config)
    +        metadata.process()
     
    -    logging.debug("Configuring networkacl")
    +    # Always run both CsAcl().process() methods
    +    # They fill the base rules in config.fw[]
         acls = CsAcl('networkacl', config)
         acls.process()
     
    -    logging.debug("Configuring firewall rules")
         acls = CsAcl('firewallrules', config)
         acls.process()
     
    -    logging.debug("Configuring PF rules")
    --- End diff --
    
    We discussed that but there were some issues we need to investigate. This 
already improves it, once we figure out how to make it conditional we'll add a 
new PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to