Bug 956531
Summary: | EC2 Implement support for copying amis | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | mkovacik | ||||||||||
Component: | ec2-images | Assignee: | wes hayutin <whayutin> | ||||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | mkovacik | ||||||||||
Severity: | unspecified | Docs Contact: | |||||||||||
Priority: | unspecified | ||||||||||||
Version: | 6.4 | CC: | dgregor, greg.martyn, ipanova, jboutaud, jcircle, jgreguske, jmatthew, jraju, lkocman, mmccorkle, tsanders, vkuznets, whayutin | ||||||||||
Target Milestone: | rc | Keywords: | EC2 | ||||||||||
Target Release: | --- | ||||||||||||
Hardware: | x86_64 | ||||||||||||
OS: | Linux | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | |||||||||||||
: | 1068715 (view as bug list) | Environment: | |||||||||||
Last Closed: | 2013-12-05 16:06:18 UTC | Type: | Bug | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Bug Depends On: | |||||||||||||
Bug Blocks: | 921116, 1068715 | ||||||||||||
Attachments: |
|
Description
mkovacik
2013-04-25 07:32:08 UTC
Created attachment 739695 [details]
cloud init log
Created attachment 739696 [details]
boot log
Created attachment 739697 [details]
/var/log/messages
Feature description: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html I believe we see reincarnation of https://bugzilla.redhat.com/show_bug.cgi?id=923996 We have /etc/rc.d/rc.local script in images which screws up sshd config by adding multiple "UseDNS no PermitRootLogin without-password" sections. Cloud-init does its own manipulations with the config and (possibly) removes last newline character. Vitaly is right; removing the /etc/rc.local's portion tampering with sshd_config the file is no more a mess. Still, cloud init doesn't care about last newline character when modifying /etc/ssh/sshd_config: [root@ip-10-151-56-248 ~]# sed -e '/^#/d' -e '/^$/d' /etc/ssh/sshd_config Protocol 2 SyslogFacility AUTHPRIV PasswordAuthentication no ChallengeResponseAuthentication no GSSAPIAuthentication yes GSSAPICleanupCredentials yes UsePAM yes AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE AcceptEnv XMODIFIERS X11Forwarding yes Subsystem sftp /usr/libexec/openssh/sftp-server PermitRootLogin without-password[root@ip-10-151-56-248 ~]# Created attachment 739964 [details]
rc.local.patch
This patch of /etc/rc.local solves the issue
agreed.. this needs to be fixed.. for 6.5 and hopefully a fix for 6.4 or respin Ref comment #5, are we agreed that this is an issue with the image rc.local, and not a bug caused by cloud-init? If so propose we reassign this to ec2-images? yup! switching to ec2-images spin-kickstarts git 238e0401763ef8721e6633472f453b7865a3e562 cloude commit dca168ea330976e6c8b9a2b15d1f3faa69a0b92a Verified with ami-044d326d (stage), rh-amazon-rhui-client-2.2.85-1 This fix needs to be propagated in all amis in 6.5. Lubos, will you do it please? Looks like the amazon RHEL servers have this patch applied incorrectly. After my initial reboot, I see the following in my /etc/sshd_config. Notice the lack of a newline in front of "UseDNS no" which breaks the next line of PermitRootLogin: # Example of overriding settings on a per-user basis #Match User anoncvs # X11Forwarding no # AllowTcpForwarding no # ForceCommand cvs serverUseDNS no PermitRootLogin without-passwordUseDNS no PermitRootLogin without-password This is a mostly stock RHEL 6.4 (Santiago) server with just apache httpd booted from the AWS / RHEL AMI. I've fixed this by booting the affected machines, commenting out the patch in rc.local (why do we have it running at EVERY boot, and only AFTER all of the other init scripts run) and then fixing the etc/sshd_config by hand. Let me know if you need anything else to reproduce this. |