Page MenuHomeVyOS Platform

'renew dhcpv6 interface <interfaceName>' command fails, but work within config session
Closed, ResolvedPublicBUG


vyos operation command 'renew dhcpv6 interface <interfaceName>' fails, with error
"DEBUG vexit_internal: calling cfgPathExists() without config session
calling cfgPathExists() without config session at /opt/vyatta/share/perl5/Vyatta/ line 82."
while the same command works within config session as 'run renew dhcpv6 interface <interfaceName>'

Reason: within script , function gen_conf_file is checking for 'duid' field
but during operation session this checking fails, and return error as above.

"Possible" patch for solution:

-- <unnamed>
@@ -57,10 +57,14 @@
     my $config = new Vyatta::Config;
-    if ($config->exists('duid')) { 
-        my $duid = $config->returnValue('duid');
-        print $FD_WR "        send dhcp6.client-id $duid;\n";
+    if($config->inSession()) {
+	if ($config->exists('duid')) { 
+        	my $duid = $config->returnValue('duid');
+        	print $FD_WR "        send dhcp6.client-id $duid;\n";
+    	}
 #    my $hostname = hostname;
 #    print $FD_WR "        send host-name \"$hostname\";\n";
 #    print $FD_WR "        send dhcp6.oro 1, 2, 7, 12, 13, 23, 24


Difficulty level
Unknown (require assessment)
1.2 Rolling 20180703
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

syncer assigned this task to Unknown Object (User).Aug 30 2019, 10:18 PM
syncer triaged this task as Low priority.
dmbaturin set Is it a breaking change? to Unspecified (possibly destroys the router).
dmbaturin added a subscriber: dmbaturin.

@nirmal The full fix is a bit more complicated. There are two cases: when it's called from conf mode at commit time, it needs to use the value from the proposed config (that's returnValue). However, in op mode, it also re-generates the config, so your fix would make the send dhcp6.client-id option disappear from the config when a user runs renew dhcpv6 interface .... A full fix needs to handle both cases and use returnEffectiveValue in op mode.

Of course, in a new implementation we likely don't want to re-generate that config at all.