mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-26 19:35:12 +00:00
On DPDK 16.11 dpdk_nic_bind.py is renamed to dpdk-devbind.py, so we are getting "file not found" both on packaging and scripts, fixed that. Also fixed inconsistent packaging. Since Seastar copied dpdk_nic_bind.py to its scripts/ directory, there're two different versions of the script, .rpm/.deb packaging different one: dist/redhat: seastar/dpdk/tools/dpdk_nic_bind.py dist/ubuntu: seastar/scripts/dpdk_nic_bind.py That's won't work because we sharing setup scripts between two distributions, so I changed dist/ubuntu package to use DPDK one. Signed-off-by: Takuya ASADA <syuu@scylladb.com> Message-Id: <1484191955-28006-1-git-send-email-syuu@scylladb.com>
33 lines
918 B
Bash
Executable File
33 lines
918 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
. /usr/lib/scylla/scylla_lib.sh
|
|
|
|
if [ "$AMI" = "yes" ] && [ -f /etc/scylla/ami_disabled ]; then
|
|
rm /etc/scylla/ami_disabled
|
|
exit 1
|
|
fi
|
|
|
|
if [ "$NETWORK_MODE" = "virtio" ]; then
|
|
ip tuntap del mode tap dev $TAP
|
|
ip tuntap add mode tap dev $TAP user $USER one_queue vnet_hdr
|
|
ip link set dev $TAP up
|
|
ip link set dev $TAP master $BRIDGE
|
|
chown $USER.$GROUP /dev/vhost-net
|
|
elif [ "$NETWORK_MODE" = "dpdk" ]; then
|
|
modprobe uio
|
|
modprobe uio_pci_generic
|
|
/usr/lib/scylla/dpdk-devbind.py --force --bind=uio_pci_generic $ETHPCIID
|
|
for n in /sys/devices/system/node/node?; do
|
|
echo $NR_HUGEPAGES > $n/hugepages/hugepages-2048kB/nr_hugepages
|
|
done
|
|
else # NETWORK_MODE = posix
|
|
if [ "$SET_NIC" = "yes" ]; then
|
|
/usr/lib/scylla/posix_net_conf.sh $IFNAME
|
|
fi
|
|
fi
|
|
if [ "$ID" = "ubuntu" ]; then
|
|
hugeadm --create-mounts
|
|
fi
|
|
|
|
/usr/lib/scylla/scylla-blocktune
|