f5devcentral / f5-puppet

Puppet modules for F5 BIG-IP
Apache License 2.0
13 stars 27 forks source link

Node names should be allowed to contain the `%` character #29

Open mrwulf opened 6 years ago

mrwulf commented 6 years ago

The puppet module fails with errors like this:

Error: /Stage[main]/Profiles::Networking::F5::Global_pools/F5_pool[/Common/pup_rp-pool]: Could not evaluate: Parameter name failed on F5_node[/dev-k8s/10.2.0.77%0]: name must match the pattern /Partition/name

These errors show up even when the node is not being managed by this module. Our particular use case is more documented here: https://github.com/F5Networks/k8s-bigip-ctlr/issues/632

Clearly % should be allowed in node names since creating an arbitrary node with create ltm node <ipaddress> will create a node with the name <ipaddress%<route domain> by default.

mrwulf commented 6 years ago

I should also mention that the node that the module chokes on is in a different partition that the module doesn't manage. Maybe the node prefetch should be more restrictive.

ericzji commented 6 years ago

I see your issue: $ sudo FACTER_url=https://admin:admin@10.192.74.111 puppet resource f5_node Error: Could not run: Parameter name failed on F5_node[/Common/1.1.1.2%1]: name must match the pattern /Partition/name

Other modules that use route domain could be impacted as well. Will try to put a fix. thanks