mirror of https://github.com/k3s-io/k3s
Fix iSCSI image
- create 120MB LUN instead of 1MB for volume_io tests - increase verbosity - rebase to Fedora 26 - targetcli now requires running dbus, so run itpull/8/head
parent
b8c5bcf48a
commit
b9ad4cb57b
|
@ -12,8 +12,9 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
FROM fedora
|
FROM fedora:26
|
||||||
RUN yum install -y iscsi-initiator-utils targetcli net-tools strace && yum clean all
|
|
||||||
|
RUN yum install -y iscsi-initiator-utils targetcli net-tools strace procps-ng psmisc && yum clean all
|
||||||
ADD run_iscsid.sh /usr/local/bin/
|
ADD run_iscsid.sh /usr/local/bin/
|
||||||
ADD initiatorname.iscsi /etc/iscsi/
|
ADD initiatorname.iscsi /etc/iscsi/
|
||||||
ADD block.tar.gz /
|
ADD block.tar.gz /
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
TAG = 0.1
|
TAG = 0.2
|
||||||
PREFIX = staging-k8s.gcr.io
|
PREFIX = staging-k8s.gcr.io
|
||||||
|
|
||||||
all: push
|
all: push
|
||||||
|
|
Binary file not shown.
|
@ -33,8 +33,9 @@ cleanup()
|
||||||
|
|
||||||
trap cleanup TERM EXIT
|
trap cleanup TERM EXIT
|
||||||
|
|
||||||
# Create 1MB device with ext2
|
# Create 120MB device with ext2
|
||||||
dd if=/dev/zero of=block count=1 bs=1M
|
# (volume_io tests need at least 100MB)
|
||||||
|
dd if=/dev/zero of=block seek=120 count=1 bs=1M
|
||||||
mkfs.ext2 block
|
mkfs.ext2 block
|
||||||
|
|
||||||
# Add index.html to it
|
# Add index.html to it
|
||||||
|
|
|
@ -16,16 +16,26 @@
|
||||||
|
|
||||||
function start()
|
function start()
|
||||||
{
|
{
|
||||||
|
# targetcli need dbus
|
||||||
|
mkdir /run/dbus
|
||||||
|
dbus-daemon --system
|
||||||
|
|
||||||
|
# clear any previous configuration
|
||||||
|
targetcli clearconfig confirm=True
|
||||||
|
|
||||||
|
# restore configuration from saveconfig.json
|
||||||
targetcli restoreconfig
|
targetcli restoreconfig
|
||||||
iscsid
|
|
||||||
|
# maximum log level
|
||||||
|
iscsid -f -d 8
|
||||||
|
|
||||||
echo "iscsid started"
|
echo "iscsid started"
|
||||||
}
|
}
|
||||||
|
|
||||||
function stop()
|
function stop()
|
||||||
{
|
{
|
||||||
echo "Stopping iscsid"
|
echo "Stopping iscsid"
|
||||||
|
killall iscsid
|
||||||
kill $( cat /var/run/iscsid.pid )
|
|
||||||
targetcli clearconfig confirm=True
|
targetcli clearconfig confirm=True
|
||||||
|
|
||||||
echo "iscsid stopped"
|
echo "iscsid stopped"
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
"dev": "block",
|
"dev": "block",
|
||||||
"name": "block",
|
"name": "block",
|
||||||
"plugin": "fileio",
|
"plugin": "fileio",
|
||||||
"size": 1048576,
|
"size": 126877696,
|
||||||
"write_back": true,
|
"write_back": true,
|
||||||
"wwn": "521c57aa-9d9b-4e5d-ab1a-527487f92a33"
|
"wwn": "521c57aa-9d9b-4e5d-ab1a-527487f92a33"
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@ var (
|
||||||
ServeHostname = ImageConfig{e2eRegistry, "serve-hostname", "1.0", true}
|
ServeHostname = ImageConfig{e2eRegistry, "serve-hostname", "1.0", true}
|
||||||
TestWebserver = ImageConfig{e2eRegistry, "test-webserver", "1.0", true}
|
TestWebserver = ImageConfig{e2eRegistry, "test-webserver", "1.0", true}
|
||||||
VolumeNFSServer = ImageConfig{gcRegistry, "volume-nfs", "0.8", false}
|
VolumeNFSServer = ImageConfig{gcRegistry, "volume-nfs", "0.8", false}
|
||||||
VolumeISCSIServer = ImageConfig{gcRegistry, "volume-icsci", "0.1", false}
|
VolumeISCSIServer = ImageConfig{gcRegistry, "volume-iscsi", "0.2", false}
|
||||||
VolumeGlusterServer = ImageConfig{gcRegistry, "volume-gluster", "0.2", false}
|
VolumeGlusterServer = ImageConfig{gcRegistry, "volume-gluster", "0.2", false}
|
||||||
VolumeCephServer = ImageConfig{gcRegistry, "volume-ceph", "0.1", false}
|
VolumeCephServer = ImageConfig{gcRegistry, "volume-ceph", "0.1", false}
|
||||||
VolumeRBDServer = ImageConfig{gcRegistry, "volume-rbd", "0.1", false}
|
VolumeRBDServer = ImageConfig{gcRegistry, "volume-rbd", "0.1", false}
|
||||||
|
|
Loading…
Reference in New Issue