weixin_39933414 2020-11-29 10:56
浏览 0

cmr migration: add firewallrule export + import step and new description version

Checklist

Description of change

  • small refactoring of the state.firewallrule struct by adding getter and removing direct access to the members
  • moving WellKnownServiceType to core/firewall
  • adds firewall rules export to migration steps
  • adds firewall rules import to migration steps
  • refactor transaction handling of firewallrules

QA steps

firewallrules in the db

regression only, as it still needs the import steps.
sh
❯ juju set-firewall-rule ssh --whitelist 192.168.1.0/16


~
❯ juju firewall-rules
Service  Whitelist subnets
ssh      192.168.1.0/16
migration
sh
juju bootstrap dst
juju bootstrap src
juju add-model blog
juju deploy wordpress
juju set-firewall-rule ssh --whitelist 192.168.1.0/16

❯ juju list-firewall-rules
Service  Whitelist subnets
ssh      192.168.1.0/16

juju migrate blog dst
juju switch dst:admin/blog

❯ juju list-firewall-rules
Service  Whitelist subnets
ssh      192.168.1.0/16

firewallrules applied check on AWS

cmr

juju add-model blog
juju deploy wikimedia
juju machines  status "blocked" because database required
juju add-model db
juju deploy mysql
juju set-firewall-rule juju-application-offer <ip_from_wikimedia>/32
juju offer mysql:db
juju switch blog
juju add-relation wikimedia:db mysql:db
juju status -> status "running"
</ip_from_wikimedia>
  • in securitygroups settings of the juju-db-machine-0 you should see one additional row with the source being /32 e.g. cmr_relation
cmr migration

is not part of this pr and should be done in another pr. Related to migrating the offer and setting the watcher appropriately.

该提问来源于开源项目:juju/juju

  • 写回答

5条回答 默认 最新

  • weixin_39933414 2020-11-29 10:56
    关注

    other test failed independent of this patch...

    
    networkinfo_test.go:263:
        c.Assert(funcErr, jc.ErrorIsNil)
    ... value *errors.Err = &errors.unformatter{message:"got 0 timers added after waiting 1s: wanted 1, stacks:\n", cause:error(nil), previous:error(nil), file:"github.com/juju/juju/vendor/github.com/juju/clock/testclock/clock.go", line:144} ()
    ... error stack:
        github.com/juju/juju/vendor/github.com/juju/clock/testclock/clock.go:144: got 0 timers added after waiting 1s: wanted 1, stacks:
    

    !!build!!

    评论

报告相同问题?