This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1281687 - hammer host update on realm fails with error ERROR -- : "\x82" from ASCII-8BIT to UTF-8
hammer host update on realm fails with error ERROR -- : "\x82" from ASCII-8BI...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Capsule (Show other bugs)
6.1.0
Unspecified Linux
high Severity high (vote)
: 6.2.2
: --
Assigned To: Ivan Necas
Kedar Bidarkar
http://projects.theforeman.org/issues...
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-13 02:03 EST by Mahesh Taru
Modified: 2016-09-14 16:59 EDT (History)
9 users (show)

See Also:
Fixed In Version: foreman-proxy-1.11.0.6-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-14 16:59:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
/var/log/foreman-proxy/proxy.log (466 bytes, text/plain)
2016-08-08 08:38 EDT, Andrew Kofink
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 10581 None None None 2016-04-26 13:05 EDT

  None (edit)
Description Mahesh Taru 2015-11-13 02:03:29 EST
Description of problem:
Trying to update host using hammer utility fails on realm.
From webui works fine.

Version-Release number of selected component (if applicable):
rubygem-hammer_cli-0.1.4.13-1.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Satellite 6.1 with realm configured
2. Try to update host using hammer.

# hammer host update --id comp-st-060 --managed yes --hostgroup-id 12
Could not update the host:
  Failed to create example.com's realm entry: ERF12-5287 [ProxyAPI::ProxyException]: Unable to create realm entry ([RestClient::BadRequest]: 400 Bad Request) for proxy https://satellite.example.com:9090/realm/INT.ACI.ICS.PSU.EDU

3. Language settings on satellite server.
# env |grep -i lang
LANG=en_US.UTF-8
LANGUAGE=

# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

# runuser - postgres -c "psql -l"
                                   List of databases
    Name    |  Owner   | Encoding |   Collate   |    Ctype    |    Access privileges    
------------+----------+----------+-------------+-------------+-------------------------
 candlepin  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =T/postgres            +
            |          |          |             |             | postgres=CTc/postgres  +
            |          |          |             |             | candlepin=CTc/postgres
 foreman    | foreman  | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =T/foreman             +
            |          |          |             |             | foreman=CTc/foreman
 gutterball | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =T/postgres            +
            |          |          |             |             | postgres=CTc/postgres  +
            |          |          |             |             | gutterball=CTc/postgres
 postgres   | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 template0  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres            +
            |          |          |             |             | postgres=CTc/postgres
 template1  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres            +
            |          |          |             |             | postgres=CTc/postgres
(6 rows)


Actual results:
host update fails at first attempt

Expected results:
host should get updated without any error
Comment 3 Bryan Kearney 2015-11-13 11:22:19 EST
Connecting redmine issue http://projects.theforeman.org/issues/10581 from this bug
Comment 4 Bryan Kearney 2015-11-13 12:02:26 EST
Upstream bug component is Capsule
Comment 9 Andrew Kofink 2016-08-08 08:38 EDT
Created attachment 1188724 [details]
/var/log/foreman-proxy/proxy.log
Comment 10 Andrew Kofink 2016-08-08 08:46:41 EDT
I'm seeing the above attached log from either the UI or CLI. I followed the instructions here for an expired keytab to no avail: http://projects.theforeman.org/projects/foreman/wiki/ERF12-5287
Comment 11 Andrew Kofink 2016-08-08 08:50:39 EDT
In addition, I noticed the documentation for Foreman 1.12 may be incorrect, or the installer contains a bug: When attempting to install the smart proxy with `foreman-installer --foreman-ipa-authentication=true`, the option I get

```
ERROR: Unrecognised option '--foreman-ipa-authentication'

See: 'foreman-installer --help'
```
Comment 12 Andrew Kofink 2016-08-08 09:48:49 EDT
inecas, this seems like a bug with the smart proxy. If it's not, please reassign me.
Comment 13 Ivan Necas 2016-08-10 06:44:04 EDT
Opened a PR upstream to address the encoding issue
Comment 14 Bryan Kearney 2016-08-15 06:10:31 EDT
Moving to POST since upstream bug http://projects.theforeman.org/issues/10581 has been closed
Comment 15 Sanket Jagtap 2016-09-13 13:13:10 EDT
Build:6.2.2-1.1.el7sat


Steps:
1. Configured satellite with REALM
2. Provisioned the host which enrolled into realm
3. Created a host group with non-ascii characters name "žluťoučký"
4. Updated the host group of the host to žluťoučký

Host enrolled into realm.

[root@kbrhel72mul99k ~]# id admin
uid=478000000(admin) gid=478000000(admins) groups=478000000(admins)

hammer> hostgroup list
---|---------------|---------------|------------------|-------------|------
ID | NAME          | TITLE         | OPERATING SYSTEM | ENVIRONMENT | MODEL
---|---------------|---------------|------------------|-------------|------
1  | rhel7_hstgrp  | rhel7_hstgrp  | RHEL Server 7.2  | production  |      
3  | žluťoučký | žluťoučký | RHEL Server 7.2  | production  |      
---|---------------|---------------|------------------|-------------|------


hammer> host update --id 6 --managed yes --hostgroup-id 3
Host updated

Also , the class field in IDM for the host is also updated with new hostgroup name.
Comment 17 errata-xmlrpc 2016-09-14 16:59:27 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1885

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