Skip to content

Commit e4be62c

Browse files
committed
oci-utils 0.14.0-3
1 parent ba172c2 commit e4be62c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+4076
-6357
lines changed

PKG-INFO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 1.1
22
Name: oci-utils
3-
Version: 0.14.1
3+
Version: 0.14.0
44
Summary: Oracle Cloud Infrastructure utilities
55
Home-page: http://github.com/oracle/oci-utils/
66
Author: Laszlo Peter

bin/oci-attached-volumes

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
# Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
4+
# Licensed under the Universal Permissive License v 1.0 as shown at
5+
# http://oss.oracle.com/licenses/upl.
6+
7+
# utility verifies if instance principal authentication with OCI is
8+
# configured correctly to create a working oci session.
9+
10+
_PY3=/usr/bin/python3
11+
_PY_CMD=oci_attached_volumes_main.py
12+
s_dir=`${_PY3} -c 'import os.path ; import oci_utils.impl ; print (os.path.dirname(oci_utils.impl.__file__))' 2>/dev/null`
13+
14+
exec ${_PY3} ${s_dir}/${_PY_CMD} "$@"
15+

bin/oci-network-config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ then
178178
cmd_line="$cmd_line --ip-address=${PRIVATE_IP}"
179179
fi
180180
# else
181-
# echo "_GT_ ${COMMAND} handled elsewhere"
181+
# echo "${COMMAND} handled elsewhere"
182182
fi
183183

184184
if [ ${EXCLUDED_ITEMS[${COMMAND}]+_} ] && [ -n "${EXCLUDED_ITEMS[${COMMAND}]}" ]

buildrpm/oci-utils.spec

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Name: oci-utils
22
Version: 0.14.0
3-
Release: 2%{?dist}
3+
Release: 3%{?dist}
44
Url: http://cloud.oracle.com/iaas
55
Summary: Oracle Cloud Infrastructure utilities
66
License: UPL
@@ -206,6 +206,11 @@ rm -rf %{buildroot}
206206
/opt/oci-utils/tests/__init__*
207207

208208
%changelog
209+
* Thu Sep 22 2022 Guido Tijskens <[email protected]> -- 0.14.0-3
210+
- LINUX-11440/LINUX-12246 iscsi does not fall back to scanning if authentication succeeds but get instance data fails
211+
- added oci-attached-volumes, collects data on volumes, via OCI if priviliges in place, via scan otherwise.
212+
- LINUX-12907 sudo oci-network-config --show missing spaces between values
213+
209214
* Mon Sep 5 2022 Guido Tijskens <[email protected]> -- 0.14.0-2
210215
- LINUX-12761/OLUEK-6199 ocid leaves lots of connections in CLOSE_WAIT state
211216

data/oci-migrate-conf.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ ol_os_oci_region_bash :
294294
- '#!/bin/bash'
295295
- unset http_proxy
296296
- unset https_proxy
297-
- CURL=$(which curl)
298-
- JQ=$(which jq)
299-
- CUT=$(which cut)
297+
- CURL=$(command -v curl)
298+
- JQ=$(command -v jq)
299+
- CUT=$(command -v cut)
300300
- METADATAURL="http://169.254.169.254"
301301
- OCIREGION=$(${CURL} -sfm 5 ${METADATAURL}/opc/v1/instance/ | ${JQ} -r '.region' | ${CUT} -d '-' -f 2)
302302
- echo '-'$OCIREGION > /etc/yum/vars/ociregion
@@ -313,9 +313,9 @@ ubuntu_os_snapd_bash:
313313
- '#!/bin/bash'
314314
- SNAPD='snapd'
315315
- snaplist=_XXXX_
316-
- SNAP=$(which snap)
317-
- SYSCTL=$(which systemctl)
318-
- LOGGER=$(which logger)
316+
- SNAP=$(command -v snap)
317+
- SYSCTL=$(command -v systemctl)
318+
- LOGGER=$(command -v logger)
319319
- ${SYSCTL} enable ${SNAPD}
320320
- ${SYSCTL} start ${SNAPD}
321321
- snapdstatus=$(${SYSCTL} status ${SNAPD})
@@ -338,8 +338,8 @@ reinitialise_cloud_init_script : /usr/local/bin/reinitialise_cloud_init.sh
338338
reinitialise_cloud_init:
339339
- '#!/bin/bash'
340340
- CLOUDINIT='cloud-init'
341-
- RM=$(which rm)
342-
- SYSTEMCTL=$(which systemctl)
341+
- RM=$(command -v rm)
342+
- SYSTEMCTL=$(command -v systemctl)
343343
- VARLIBCLOUD='/var/lib/cloud/'
344344
- VARLOGCLOUD='/var/log/cloud'
345345
- ${RM} -rf "${VARLIBCLOUD}*"

lib/oci_utils/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,7 @@ def is_root_user():
159159
-------
160160
bool: True if root, False otherwise.
161161
"""
162-
if os.geteuid() != 0:
163-
return False
164-
return True
162+
return bool(os.getuid() == 0)
165163

166164

167165
def get_os_release_data():

0 commit comments

Comments
 (0)