From ad6d4bdbe9b2bb26e8dfaef10120b1476ffc8240 Mon Sep 17 00:00:00 2001
From: Takashi Kajinami <tkajinam@redhat.com>
Date: Thu, 14 Apr 2022 17:21:59 +0900
Subject: [PATCH] Fix validation of datapath_type

Commit 5c809de01630ee7eede500106143810ca57b58b5 updated default value
of $datapath_type but the validation logic was not properly updated.
This change fixes the logic so that it properly fail with the new
default value (undef).

Change-Id: If44a90a817bf1fd5d5b9bd15fa915243a048a196
---
 manifests/controller.pp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/manifests/controller.pp b/manifests/controller.pp
index 397f8e3..194368f 100644
--- a/manifests/controller.pp
+++ b/manifests/controller.pp
@@ -119,7 +119,7 @@ class ovn::controller(
 
   include ovn::params
 
-  if $enable_dpdk and is_service_default($datapath_type) {
+  if $enable_dpdk and (is_service_default($datapath_type) or $datapath_type == undef){
     fail('Datapath type must be set when DPDK is enabled')
   }