OpenNebula / one-apps

Toolchain to build OpenNebula appliances
Apache License 2.0
12 stars 10 forks source link

VR: undefined method `upcase' for nil:NilClass (NoMethodError) if protocol is missing #66

Closed OpenNebulaSupport closed 6 months ago

OpenNebulaSupport commented 6 months ago

If a value for protocol-related Virtual router (VR) attribute is not specified the following error appears:

(erb):26:in `block (2 levels) in render_lvs_conf': undefined method `upcase' for nil:NilClass (NoMethodError)
from (erb):15:in `each'
from (erb):15:in `block in render_lvs_conf'
from (erb):1:in `each'
from (erb):1:in `render_lvs_conf'
from /usr/lib/ruby/3.2.0/erb.rb:429:in `eval'
from /usr/lib/ruby/3.2.0/erb.rb:429:in `result'
from /etc/one-appliance/service.d/VRouter/LVS/execute.rb:37:in `render_lvs_conf'
from /etc/one-appliance/service.d/VRouter/LVS/execute.rb:85:in `execute'
from -e:1:in `<main>'
I, [2024-02-22T03:05:07.823508 [#11888](https://opennebula.zendesk.com/agent/tickets/11888)] INFO -- : LVS::execute

Keeplalived assumes it's UDP by default. The code needs to treat such case properly.