Project

General

Custom queries

Profile

Actions

Bug #34100

closed

TFTP Storage check fails on undefined method `[]' for nil:NilClass

Added by Evgeni Golov over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

the problem is in ./definitions/checks/foreman_proxy/check_tftp_storage.rb:

def self.lookup_token_duration
data = feature(:foreman_database). \
query("select s.value, s.default from settings s \
where category = 'Setting::Provisioning' and name = 'token_duration'")
YAML.load(data[0]['value'] || data[0]['default'])
end

but `data` is `[]`, so `data0` is nil and `nil['value']` gets you the nice error

Actions #1

Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Evgeni Golov
  • Pull request https://github.com/theforeman/foreman_maintain/pull/568 added
Actions #2

Updated by Evgeni Golov over 3 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF