Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: invalid CIDR address #34

Open
stanislav-chlebec opened this issue Mar 27, 2019 · 1 comment
Open

error: invalid CIDR address #34

stanislav-chlebec opened this issue Mar 27, 2019 · 1 comment

Comments

@stanislav-chlebec
Copy link
Contributor

stanislav-chlebec commented Mar 27, 2019

Hi
I tried to run this example
https://github.com/contiv/vpp/blob/master/k8s/examples/sfc-controller/sfc-controller.yaml

In vpp-agent log I got an error

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
*   NEW EVENT: Kubernetes State Change                                                                                       #58 *
*              * resource: pod                                                                                                   *
*              * key: k8s/pod/vnf2/namespace/default                                                                             *
*              * prev-value: name:"vnf2" namespace:"default" label:<key:"sfc" value:"true" > container:<name:"vnf2"              *
*                    port:<container_port:5002 > >                                                                               *
*              * new-value: name:"vnf2" namespace:"default" label:<key:"sfc" value:"true" > host_ip_address:"147.75.72.194"      *
*                    container:<name:"vnf2" port:<container_port:5002 > >                                                        *
*   EVENT HANDLERS: policy                                                                                                       *
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
time="2019-03-27 09:16:24.06183" level=debug msg="Pod does not have an IP Address assigned yet" loc="processor/processor.go(220)" logger=policy.-policyProcessor update-pod="name:\"vnf2\" namespace:\"default\" label:<key:\"sfc\" value:\"true\" > host_ip_address:\"147.75.72.194\" container:<name:\"vnf2\" port:<container_port:5002 > > "
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
*   FINALIZED EVENT: Kubernetes State Change                                                                                 #58 *
*   HANDLED BY: policy                                                                                                  took 1ms *
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
*   NEW EVENT: External Config Change [DB, PUT]                                                                              #59 *
*              * key: config/vpp/v2/route/vrf/0/dst/192.168.40.31/32/gw/192.168.16.2                                             *
*                new-value: dst_network:"192.168.40.31" next_hop_addr:"192.168.16.2"                                             *
*                      outgoing_interface:"VirtualFunctionEthernet1/0/2" preference:5                                            *
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+======================================================================================================================+
| Transaction #11                                                                                       NB Transaction |
+======================================================================================================================+
  * transaction arguments:
      - seq-num: 11
      - type: NB Transaction
      - Description: External Config Change
      - values:
          - key: config/vpp/v2/route/vrf/0/dst/192.168.40.31/32/gw/192.168.16.2
            val: { dst_network:"192.168.40.31" next_hop_addr:"192.168.16.2" outgoing_interface:"VirtualFunctionEthernet1/0/2" preference:5  }

o----------------------------------------------------------------------------------------------------------------------o
  * executed operations (2019-03-27 09:16:24.123 +0000 UTC -> 2019-03-27 09:16:24.125 +0000 UTC, dur: 2ms):
      1. CREATE:
          - key: config/vpp/v2/route/vrf/0/dst/192.168.40.31/32/gw/192.168.16.2
          - value: { dst_network:"192.168.40.31" next_hop_addr:"192.168.16.2" outgoing_interface:"VirtualFunctionEthernet1/0/2" preference:5  } 
          - error: invalid CIDR address: 192.168.40.31
x----------------------------------------------------------------------------------------------------------------------x
| #11                                                                                                       took 1.8ms |
x----------------------------------------------------------------------------------------------------------------------x

``
It seems that dst_network:"192.168.40.31" is missing "/32"

@stanislav-chlebec
Copy link
Contributor Author

#29 (comment)
Missing prefixes in definitions for these keys

/vnf-agent/vppagent/config/vpp/v2/route/vrf/0/dst/192.168.40.31/32/gw/192.168.16.2
/vnf-agent/vppagent/config/vpp/v2/interfaces/IF_VXLAN_LOOPBACK_vppagent
/vnf-agent/contivvpp/config/vpp/v2/interfaces/IF_VXLAN_LOOPBACK_contivvpp
/vnf-agent/contivvpp/config/vpp/v2/route/vrf/0/dst/192.168.40.30/32/gw/192.168.16.1
/vnf-agent/vppagent/config/vpp/v2/route/vrf/0/dst/192.168.40.31/32/gw/192.168.16.2

"dst_network":"192.168.40.31" should be "dst_network":"192.168.40.31/32"
"ip_addresses":["192.168.40.30"], should be "ip_addresses":["192.168.40.30/24"],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant