Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1497722 - Could not create the Auth Source: resource has no errors on creating an Active Directory auth source
Summary: Could not create the Auth Source: resource has no errors on creating an Activ...
Keywords:
Status: CLOSED DUPLICATE of bug 1496950
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: LDAP
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: Daniel Lobato Garcia
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-02 14:06 UTC by Roman Plevka
Modified: 2017-10-02 16:52 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-02 16:52:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Roman Plevka 2017-10-02 14:06:53 UTC
Description of problem:

Snap #16 has introduced a regression, where we're no longer able to create Active Directory auth source:

```
# hammer -d -u admin -p changeme --output=csv auth-source ldap create --account="foobar" --server-type="active_directory" --name="IzopiaTjmy" --account-password="Secret@777" --host="10.65.201.117" --attr-login="sAMAccountName" --attr-lastname="sn" --groups-base="CN=foobargroup,DC=fortellolabs,DC=org" --attr-mail="mail" --base-dn="CN=Users,DC=fortellolabs,DC=org" --onthefly-register="true" --attr-firstname="givenName"

[ INFO 2017-10-02 09:31:32 HammerCLIForeman::AuthSourceLdap::CreateCommand] Called with options: {"option_name"=>"IzopiaTjmy", "option_host"=>"10.65.201.117", "option_account"=>"foobar", "option_base_dn"=>"CN=Users,DC=fortellolabs,DC=org", "option_account_password"=>"***", "option_attr_login"=>"sAMAccountName", "option_attr_firstname"=>"givenName", "option_attr_lastname"=>"sn", "option_attr_mail"=>"mail", "option_onthefly_register"=>true, "option_groups_base"=>"CN=foobargroup,DC=fortellolabs,DC=org", "option_use_netgroups"=>false, "option_server_type"=>"active_directory"}
[ INFO 2017-10-02 09:31:33 API] Server: https://<server>.com
[ INFO 2017-10-02 09:31:33 API] POST /api/auth_source_ldaps
[DEBUG 2017-10-02 09:31:33 API] Params: {
    "auth_source_ldap" => {
                     "name" => "IzopiaTjmy",
                     "host" => "<ip>",
                  "account" => "foobar",
                  "base_dn" => "CN=Users,DC=fortellolabs,DC=org",
         "account_password" => "***",
               "attr_login" => "sAMAccountName",
           "attr_firstname" => "givenName",
            "attr_lastname" => "sn",
                "attr_mail" => "mail",
        "onthefly_register" => true,
              "groups_base" => "CN=foobargroup,DC=fortellolabs,DC=org",
            "use_netgroups" => false,
              "server_type" => "active_directory"
    }
}
[DEBUG 2017-10-02 09:31:33 API] Headers: {}
[DEBUG 2017-10-02 09:31:33 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[ERROR 2017-10-02 09:31:33 API] 500 Internal Server Error
[DEBUG 2017-10-02 09:31:33 API] {
    "error" => {
        "message" => "resource have no errors"
    }
}
[DEBUG 2017-10-02 09:31:33 Exception] Using exception handler HammerCLIForeman::ExceptionHandler#handle_internal_error
[ERROR 2017-10-02 09:31:33 Exception] resource have no errors
Could not create the Auth Source:
  resource have no errors
[ERROR 2017-10-02 09:31:33 Exception] 

RestClient::InternalServerError (500 Internal Server Error):
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/abstract_response.rb:74:in `return!'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:352:in `block in rest_client_call_block'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:493:in `process_result'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:421:in `block in transmit'
    /opt/rh/rh-ruby23/root/usr/share/ruby/net/http.rb:853:in `start'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:413:in `transmit'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:176:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/resource.rb:67:in `post'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:324:in `call_client'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:240:in `http_call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:190:in `call_action'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:185:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/resource.rb:21:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.11.0/lib/hammer_cli/apipie/command.rb:43:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.11.0/lib/hammer_cli_foreman/commands.rb:166:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.11.0/lib/hammer_cli/apipie/command.rb:34:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.11.0/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.11.0/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.11.0/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.11.0/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.11.0/bin/hammer:147:in `<top (required)>'
    /usr/bin/hammer:23:in `load'
    /usr/bin/hammer:23:in `<main>'

```

This will be somewhat related to https://bugzilla.redhat.com/show_bug.cgi?id=1492835

Version-Release number of selected component (if applicable):
6.3.0-18

How reproducible:
always


Actual results:
500 (resource has no errors)

Expected results:
NO error, auth source added successfully.

Comment 3 Kedar Bidarkar 2017-10-02 16:52:07 UTC

*** This bug has been marked as a duplicate of bug 1496950 ***


Note You need to log in before you can comment on or make changes to this bug.