Project

General

Profile

Actions

Bug #3517

closed

An error is displayed in the WebUI and the logs when removing a node because of an inefficient current action

Added by Nicolas PERRON almost 10 years ago. Updated over 9 years ago.

Status:
Released
Priority:
1
Category:
Web - Nodes & inventories
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Regression:

Description

Removing a Node which has not resolvable name lead to display errors like in the picture above:


Files

Actions #1

Updated by Nicolas PERRON almost 10 years ago

And in /var/log/rudder/webapp/2013_04_24.stderrout.log:

[...]
11:17:26.683 [qtp760805843-76] DEBUG com.normation.rudder.services.servers.RemoveNodeServiceImpl - Trying to clear all Nodes Configuration
11:17:26.685 [qtp760805843-76] DEBUG com.normation.rudder.services.servers.NodeConfigurationServiceImpl - Concurrent acces for method getStackTrace
11:17:26.778 [qtp760805843-76] ERROR net.liftweb.http.LiftRules - Exception being returned to browser when processing Req(List(F1163938454405HUZJAC), Map(F1163938454405HUZJAC -> List(true)), ParsePath(List(ajax_request, F1163938454370QOYXHH, index),,true,true), /rudder, PostRequest, Full(application/x-www-form-urlencoded; charset=UTF-8))
java.nio.channels.OverlappingFileLockException: null
    at sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList(FileChannelImpl.java:1166) ~[na:1.6.0_29]
    at sun.nio.ch.FileChannelImpl$SharedFileLockTable.add(FileChannelImpl.java:1068) ~[na:1.6.0_29]
    at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:868) ~[na:1.6.0_29]
    at java.nio.channels.FileChannel.tryLock(FileChannel.java:962) ~[na:1.6.0_29]
    at com.normation.rudder.services.servers.NodeConfigurationServiceImpl.inLock(NodeConfigurationServiceImpl.scala:105) ~[rudder-core-2.5.2.jar:na]
    at com.normation.rudder.services.servers.NodeConfigurationServiceImpl.deleteAllNodeConfigurations(NodeConfigurationServiceImpl.scala:385) ~[rudder-core-2.5.2.jar:na]
    at com.normation.rudder.services.servers.RemoveNodeServiceImpl.com$normation$rudder$services$servers$RemoveNodeServiceImpl$$deleteAllNodesConfiguration(RemoveNodeService.scala:130) ~[rudder-core-2.5.2.jar:na]
    at com.normation.rudder.services.servers.RemoveNodeServiceImpl$$anonfun$com$normation$rudder$services$servers$RemoveNodeServiceImpl$$atomicDelete$1$$anonfun$apply$4.apply(RemoveNodeService.scala:103) ~[rudder-core-2.5.2.jar:na]
    at com.normation.rudder.services.servers.RemoveNodeServiceImpl$$anonfun$com$normation$rudder$services$servers$RemoveNodeServiceImpl$$atomicDelete$1$$anonfun$apply$4.apply(RemoveNodeService.scala:102) ~[rudder-core-2.5.2.jar:na]
    at net.liftweb.common.Full.flatMap(Box.scala:493) ~[lift-common_2.9.1-2.4.jar:2.4]
    at com.normation.rudder.services.servers.RemoveNodeServiceImpl$$anonfun$com$normation$rudder$services$servers$RemoveNodeServiceImpl$$atomicDelete$1.apply(RemoveNodeService.scala:102) ~[rudder-core-2.5.2.jar:na]
    at com.normation.rudder.services.servers.RemoveNodeServiceImpl$$anonfun$com$normation$rudder$services$servers$RemoveNodeServiceImpl$$atomicDelete$1.apply(RemoveNodeService.scala:101) ~[rudder-core-2.5.2.jar:na]
    at net.liftweb.common.Full.flatMap(Box.scala:493) ~[lift-common_2.9.1-2.4.jar:2.4]
    at com.normation.rudder.services.servers.RemoveNodeServiceImpl.com$normation$rudder$services$servers$RemoveNodeServiceImpl$$atomicDelete(RemoveNodeService.scala:101) ~[rudder-core-2.5.2.jar:na]
    at com.normation.rudder.services.servers.RemoveNodeServiceImpl$$anonfun$removeNode$2$$anonfun$apply$1.apply(RemoveNodeService.scala:75) ~[rudder-core-2.5.2.jar:na]
    at com.normation.rudder.services.servers.RemoveNodeServiceImpl$$anonfun$removeNode$2$$anonfun$apply$1.apply(RemoveNodeService.scala:75) ~[rudder-core-2.5.2.jar:na]
    at com.normation.utils.ScalaLock$$anonfun$apply$1.apply(Lock.scala:45) ~[utils-2.5.2.jar:na]
    at com.normation.utils.ScalaLock$$anonfun$apply$1.apply(Lock.scala:45) ~[utils-2.5.2.jar:na]
    at com.normation.utils.ScalaLock$class.map(Lock.scala:35) ~[utils-2.5.2.jar:na]
    at com.normation.utils.ScalaLock$$anon$1.map(Lock.scala:58) ~[utils-2.5.2.jar:na]
    at com.normation.utils.ScalaLock$class.apply(Lock.scala:45) ~[utils-2.5.2.jar:na]
    at com.normation.utils.ScalaLock$$anon$1.apply(Lock.scala:58) ~[utils-2.5.2.jar:na]
    at com.normation.rudder.services.servers.RemoveNodeServiceImpl$$anonfun$removeNode$2.apply(RemoveNodeService.scala:75) ~[rudder-core-2.5.2.jar:na]
    at com.normation.rudder.services.servers.RemoveNodeServiceImpl$$anonfun$removeNode$2.apply(RemoveNodeService.scala:73) ~[rudder-core-2.5.2.jar:na]
    at net.liftweb.common.Full.flatMap(Box.scala:493) ~[lift-common_2.9.1-2.4.jar:2.4]
    at com.normation.rudder.services.servers.RemoveNodeServiceImpl.removeNode(RemoveNodeService.scala:73) ~[rudder-core-2.5.2.jar:na]
    at com.normation.rudder.web.services.DisplayNode$.com$normation$rudder$web$services$DisplayNode$$removeNode(DisplayNode.scala:708) ~[classes/:na]
    at com.normation.rudder.web.services.DisplayNode$$anonfun$93.apply(DisplayNode.scala:691) ~[classes/:na]
    at com.normation.rudder.web.services.DisplayNode$$anonfun$93.apply(DisplayNode.scala:691) ~[classes/:na]
    at net.liftweb.http.S$NFuncHolder$$anonfun$apply$5.apply(S.scala:190) ~[lift-webkit_2.9.1-2.4.jar:2.4]
    at net.liftweb.http.S$NFuncHolder$$anonfun$apply$5.apply(S.scala:190) ~[lift-webkit_2.9.1-2.4.jar:2.4]
11:17:27.924 [qtp760805843-78] DEBUG com.normation.rudder.services.servers.RemoveNodeServiceImpl - Trying to remove node f2a84868-222d-4008-a5f1-3352271ed6dd from the LDAP
11:17:27.946 [qtp760805843-78] ERROR com.normation.rudder.web.services.DisplayNode - Could not remove node f2a84868-222d-4008-a5f1-3352271ed6dd from Rudder <- Node with ID 'f2a84868-222d-4008-a5f1-3352271ed6dd' was not found
[...]
Actions #2

Updated by Nicolas PERRON almost 10 years ago

  • Target version changed from 2.5.3 to 2.5.4
Actions #3

Updated by Nicolas CHARLES over 9 years ago

Nicolas

I can reproduce this issue; I can't see how the resolvability of the hostname could influence anything

The stacktrace seems to point to a locking problem... do you have more info on the configuration ?

Actions #4

Updated by Nicolas PERRON over 9 years ago

I'm not sure about the link between the resolvability of the hostname and the issue.

This server had several nodes to manage then I'd added a new node which came from vagrant on my own machine. This node could contact the server but its hostname was not known into the server. It's the only obvious difference I've seen between this node and the others. It could be wrong.

Actions #5

Updated by François ARMAND over 9 years ago

That error seems to also have been reported by dnns:

16:53 < dnns> i deleted a node from rudder (2.5 that is)
16:54 < dnns> and it gave an error
16:54 < dnns> but.. the node is deleted
16:55 < fanf> dnns: partial success ?
16:55 < dnns> i don't know, the node is deleted, but there was an error
16:55 < fanf> dnns: more seriously, did you keep the error ?
16:56 < dnns> no but the error gave no info at all
16:56 < fanf> :/
17:04 < Vince_MacBuche> There is nothing in /var/log/rudder/webapp/2013_05_23.webapp.log which could be 
                        linked to that error ?
17:07 < dnns> no can't find any
17:16 < ncharles_> dnns: is it like http://www.rudder-project.org/redmine/issues/3420 ?
17:17 < dnns> yes
17:18 < dnns> but i can re-generate rules still
17:20 < ncharles_> so more like http://www.rudder-project.org/redmine/issues/3517 ?
17:34 < dnns> ncharles_: yes!
Actions #6

Updated by Nicolas PERRON over 9 years ago

  • Target version changed from 2.5.4 to 2.5.5
Actions #7

Updated by Vincent MEMBRÉ over 9 years ago

  • Category set to Web - Nodes & inventories
  • Status changed from New to In progress
  • Assignee set to Vincent MEMBRÉ
  • Priority changed from N/A to 1

This does not seem to be an hostname error, In fact an exception is launched, when trying to acquire a Lock.

Which fails the remove node (after removing it from groups and directives)

It should wait for the lock file tu be acquired.

Actions #8

Updated by Vincent MEMBRÉ over 9 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Vincent MEMBRÉ to François ARMAND
  • Target version changed from 2.5.5 to 2.4.7
  • Pull Request set to https://github.com/Normation/rudder/pull/228

This happens on 2.4 too, The exception is not handled too.

The pull request here is a simple workaround, a far more longer and deeper change should be done about node configurations are handled in Rudder.

Pull request : https://github.com/Normation/rudder/pull/228

Actions #9

Updated by Vincent MEMBRÉ over 9 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
Actions #10

Updated by Anonymous over 9 years ago

Actions #11

Updated by Nicolas PERRON over 9 years ago

  • Subject changed from Removing a node which is hostname is not resolvable lead to an error in the WebUI and the logs but remove the node to An error is displayed in the WebUI and the logs when removing a node because of an inefficient current action
Actions #12

Updated by Nicolas PERRON over 9 years ago

  • Status changed from Pending release to Released
Actions #13

Updated by Nicolas PERRON over 9 years ago

This bug has been fixed in Rudder 2.4.7, which was released today.
Check out:

Actions

Also available in: Atom PDF