Merge pull request #3197 from bgilbert/oci

Drop Oracle OCI support
This commit is contained in:
Benjamin Gilbert 2018-04-26 00:18:15 -04:00 committed by GitHub
commit 273f081d13
13 changed files with 2 additions and 157 deletions

View File

@ -10,7 +10,7 @@ CROS_WORKON_REPO="git://github.com"
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
else
CROS_WORKON_COMMIT="19ecf75a44b5c985e4f3cb312caa19f776277cb9"
CROS_WORKON_COMMIT="485860b2dbcfefea28f747992255d4e6557c8777"
KEYWORDS="amd64 arm arm64 x86"
fi

View File

@ -1,4 +0,0 @@
These Ignition configs are part of the OEM configuration. Do not modify
them. If you want to write an Ignition config directly to disk, put it in
../config.ign and it will be applied at first boot instead of a config
in userdata.

View File

@ -1,45 +0,0 @@
{
"ignition": {
"version": "2.1.0"
},
"storage": {
"files": [
{
"filesystem": "root",
"path": "/etc/systemd/system/oracle-oci-root-setup.service",
"contents": {
"source": "oem:///units/oracle-oci-root-setup.service"
},
"mode": 292
},
{
"filesystem": "root",
"path": "/etc/systemd/system/oracle-oci-iptables.service",
"contents": {
"source": "oem:///units/oracle-oci-iptables.service"
},
"mode": 292
}
]
},
"systemd": {
"units": [
{
"name": "coreos-metadata-sshkeys@.service",
"enabled": true
},
{
"name": "iscsid.service",
"enabled": true
},
{
"name": "oracle-oci-root-setup.service",
"enabled": true
},
{
"name": "oracle-oci-iptables.service",
"enabled": true
}
]
}
}

View File

@ -1,8 +0,0 @@
# CoreOS Container Linux GRUB settings
set oem_id="oracle-oci"
set linux_console="console=ttyS0,9600"
serial com0 --speed=9600
terminal_input serial_com0
terminal_output serial_com0

View File

@ -1,16 +0,0 @@
# Loaded by oracle-oci-iptables.service
*mangle
:oracle-oci-link-local -
-A oracle-oci-link-local -d 169.254.0.2/32 -p tcp -m owner --uid-owner 0 -m tcp --dport 3260 -m comment --comment "See the Oracle-Provided Images section in the Oracle Bare Metal documentation for security impact of modifying or removing this rule" -j ACCEPT
-A oracle-oci-link-local -d 169.254.2.0/24 -p tcp -m owner --uid-owner 0 -m tcp --dport 3260 -m comment --comment "See the Oracle-Provided Images section in the Oracle Bare Metal documentation for security impact of modifying or removing this rule" -j ACCEPT
-A oracle-oci-link-local -d 169.254.0.2/32 -p tcp -m tcp --dport 80 -m comment --comment "See the Oracle-Provided Images section in the Oracle Bare Metal documentation for security impact of modifying or removing this rule" -j ACCEPT
-A oracle-oci-link-local -d 169.254.169.254/32 -p udp -m udp --dport 53 -m comment --comment "See the Oracle-Provided Images section in the Oracle Bare Metal documentation for security impact of modifying or removing this rule" -j ACCEPT
-A oracle-oci-link-local -d 169.254.169.254/32 -p tcp -m tcp --dport 53 -m comment --comment "See the Oracle-Provided Images section in the Oracle Bare Metal documentation for security impact of modifying or removing this rule" -j ACCEPT
-A oracle-oci-link-local -d 169.254.0.3/32 -p tcp -m owner --uid-owner 0 -m tcp --dport 80 -m comment --comment "See the Oracle-Provided Images section in the Oracle Bare Metal documentation for security impact of modifying or removing this rule" -j ACCEPT
-A oracle-oci-link-local -d 169.254.0.4/32 -p tcp -m tcp --dport 80 -m comment --comment "See the Oracle-Provided Images section in the Oracle Bare Metal documentation for security impact of modifying or removing this rule" -j ACCEPT
-A oracle-oci-link-local -d 169.254.169.254/32 -p tcp -m tcp --dport 80 -m comment --comment "See the Oracle-Provided Images section in the Oracle Bare Metal documentation for security impact of modifying or removing this rule" -j ACCEPT
-A oracle-oci-link-local -d 169.254.169.254/32 -p udp -m udp --dport 67 -m comment --comment "See the Oracle-Provided Images section in the Oracle Bare Metal documentation for security impact of modifying or removing this rule" -j ACCEPT
-A oracle-oci-link-local -d 169.254.169.254/32 -p udp -m udp --dport 69 -m comment --comment "See the Oracle-Provided Images section in the Oracle Bare Metal documentation for security impact of modifying or removing this rule" -j ACCEPT
# REJECT unavailable in POSTROUTING
-A oracle-oci-link-local -d 169.254.0.0/16 -m comment --comment "See the Oracle-Provided Images section in the Oracle Bare Metal documentation for security impact of modifying or removing this rule" -j DROP
COMMIT

View File

@ -1,5 +0,0 @@
ID=oracle-oci
VERSION_ID=@@OEM_VERSION_ID@@
NAME="Oracle Cloud Infrastructure"
HOME_URL="https://cloud.oracle.com/en_US/bare-metal"
BUG_REPORT_URL="https://issues.coreos.com"

View File

@ -1,21 +0,0 @@
[Unit]
Description=Oracle OCI Firewall Rules
Before=network.target
After=iptables-restore.service
# Avoid races in case both are queued
Before=iptables-save.service
[Service]
Type=oneshot
# Load oracle-oci-link-local chain, overwriting any existing contents.
# Invoke rules from mangle/POSTROUTING because fewer firewall tools are
# likely to change it.
ExecStart=/usr/sbin/iptables-restore --noflush /usr/share/oem/iptables-rules
# Insert jump to link-local chain at beginning of mangle/POSTROUTING, only
# if the existing ruleset doesn't have it.
ExecStart=/bin/sh -c "/usr/sbin/iptables -t mangle -C POSTROUTING -d 169.254.0.0/16 -j oracle-oci-link-local 2>/dev/null || iptables -t mangle -I POSTROUTING 1 -d 169.254.0.0/16 -j oracle-oci-link-local"
[Install]
WantedBy=basic.target

View File

@ -1,22 +0,0 @@
[Unit]
Description=Configure Oracle OCI Root Disk
ConditionPathExists=!/etc/iscsi/nodes/iqn.2015-02.oracle.boot:uefi
Before=iscsid.service
[Service]
Type=oneshot
# This starts its own iscsid until the unit finishes and systemd kills it
# again. That's not ideal, but sequencing this unit after iscsid.service
# has been observed to result in parameters not propagating to the kernel
# iSCSI session (presumably due to a race with session recovery).
ExecStart=/usr/sbin/iscsiadm -m node -o new -T iqn.2015-02.oracle.boot:uefi -p 169.254.0.2:3260,1
# Never automatically log out of the root disk
ExecStart=/usr/sbin/iscsiadm -m node -T iqn.2015-02.oracle.boot:uefi -o update -n node.startup -v onboot
# Root-on-iSCSI settings from open-iscsi README
ExecStart=/usr/sbin/iscsiadm -m node -T iqn.2015-02.oracle.boot:uefi -o update -n node.conn[0].timeo.noop_out_interval -v 0
ExecStart=/usr/sbin/iscsiadm -m node -T iqn.2015-02.oracle.boot:uefi -o update -n node.conn[0].timeo.noop_out_timeout -v 0
ExecStart=/usr/sbin/iscsiadm -m node -T iqn.2015-02.oracle.boot:uefi -o update -n node.session.timeo.replacement_timeout -v 86400
[Install]
RequiredBy=iscsid.service

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
</pkgmetadata>

View File

@ -1,29 +0,0 @@
# Copyright (c) 2017 CoreOS, Inc.. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=5
DESCRIPTION="OEM suite for Oracle OCI images"
HOMEPAGE=""
SRC_URI=""
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 arm64 x86"
# no source directory
S="${WORKDIR}"
src_prepare() {
sed -e "s\\@@OEM_VERSION_ID@@\\${PVR}\\g" \
"${FILESDIR}/oem-release" > "${T}/oem-release" || die
}
src_install() {
insinto "/usr/share/oem"
doins "${FILESDIR}/grub.cfg"
doins "${FILESDIR}/iptables-rules"
doins "${T}/oem-release"
doins -r "${FILESDIR}/base"
doins -r "${FILESDIR}/units"
}

View File

@ -10,7 +10,7 @@ CROS_WORKON_REPO="git://github.com"
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
else
CROS_WORKON_COMMIT="dbc26943853ff3a84060bd55ecf963e58e8c4c70"
CROS_WORKON_COMMIT="deba0732daec569545cf456f0cc514f17c7529b5"
KEYWORDS="amd64 arm arm64 x86"
fi
@ -34,7 +34,6 @@ src_install() {
"${D}"/usr/lib/dracut/modules.d/30ignition/ignition-generator \
"${D}"/usr/lib/dracut/modules.d/30ignition/ignition-setup.sh \
"${D}"/usr/lib/dracut/modules.d/30ignition/retry-umount.sh \
"${D}"/usr/lib/dracut/modules.d/90iscsi-root/iscsi-root-generator \
"${D}"/usr/lib/dracut/modules.d/99setup-root/initrd-setup-root \
|| die chmod
}