From 418b5180d21af2bbcc8f393c3abe7d4ea29ea00f Mon Sep 17 00:00:00 2001 From: James Fantin-Hardesty <24646452+jfantinhardesty@users.noreply.github.com> Date: Fri, 28 Feb 2025 10:13:25 -0700 Subject: [PATCH 1/3] Change defaults in gui and CLI to be more sensible --- README.md | 6 - cmd/mount.go | 2 +- common/log/logger.go | 6 - common/log/logger_linux.go | 30 +- common/log/logger_windows.go | 22 +- common/types.go | 2 +- component/file_cache/file_cache.go | 2 +- doc/cloudfuse_mount.md | 10 +- doc/cloudfuse_mount_all.md | 4 +- doc/cloudfuse_mount_list.md | 6 +- gui/azure_config_advanced.py | 2 - gui/azure_config_advanced.ui | 10 - gui/azure_config_advanced_ui.py | 607 +++++++++++++++++++++++++++++ gui/common_qt_functions.py | 7 +- gui/s3_config_advanced.py | 7 - gui/s3_config_advanced.ui | 10 - gui/s3_config_advanced_ui.py | 350 +++++++++++++++++ setup/advancedConfig.yaml | 9 +- setup/baseConfig.yaml | 13 +- tools/health-monitor/main.go | 4 +- 20 files changed, 1010 insertions(+), 99 deletions(-) create mode 100644 gui/azure_config_advanced_ui.py create mode 100644 gui/s3_config_advanced_ui.py diff --git a/README.md b/README.md index b05d1d532..1a6ddc610 100644 --- a/README.md +++ b/README.md @@ -197,12 +197,6 @@ Kindly avoid using this feature for write while we investigate and resolve it. `docker run -it --rm --cap-add=SYS_ADMIN --device=/dev/fuse --security-opt apparmor:unconfined ` -### Syslog security warning - -By default, Cloudfuse will log to syslog. The default settings will, in some -cases, log relevant file paths to syslog. If this is sensitive information, turn -off logging or set log-level to LOG_ERR. - ## License The Cloudfuse project is licensed under MIT. diff --git a/cmd/mount.go b/cmd/mount.go index 8c598340c..d142e68c0 100644 --- a/cmd/mount.go +++ b/cmd/mount.go @@ -685,7 +685,7 @@ func init() { mountCmd.PersistentFlags().StringVar(&options.PassPhrase, "passphrase", "", "Base64 encoded key to decrypt config file. Can also be specified by env-variable CLOUDFUSE_SECURE_CONFIG_PASSPHRASE.\n Decoded key length shall be 16 (AES-128), 24 (AES-192), or 32 (AES-256) bytes in length.") - mountCmd.PersistentFlags().String("log-type", "syslog", "Type of logger to be used by the system. Set to syslog by default. Allowed values are silent|syslog|base.") + mountCmd.PersistentFlags().String("log-type", "base", "Type of logger to be used by the system. Set to syslog by default. Allowed values are silent|syslog|base.") config.BindPFlag("logging.type", mountCmd.PersistentFlags().Lookup("log-type")) _ = mountCmd.RegisterFlagCompletionFunc("log-type", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { return []string{"silent", "base", "syslog"}, cobra.ShellCompDirectiveNoFileComp diff --git a/common/log/logger.go b/common/log/logger.go index 0409df1bb..c8dfda819 100644 --- a/common/log/logger.go +++ b/common/log/logger.go @@ -177,12 +177,6 @@ func LogRotate() error { return logObj.LogRotate() } -func init() { - logObj, _ = NewLogger("syslog", common.LogConfig{ - Level: common.ELogLevel.LOG_DEBUG(), - }) -} - // TimeTracker : Dump time taken by a call func TimeTrack(start time.Time, location string, name string) { if timeTracker { diff --git a/common/log/logger_linux.go b/common/log/logger_linux.go index 7f465401a..f7bd79884 100644 --- a/common/log/logger_linux.go +++ b/common/log/logger_linux.go @@ -42,7 +42,21 @@ func NewLogger(name string, config common.LogConfig) (Logger, error) { config.Tag = common.FileSystemName } - if name == "base" { + if name == "syslog" { + sysLogger, err := newSysLogger(config.Level, config.Tag) + if err != nil { + if err == NoSyslogService { + // Syslog service does not exists on this system + // fallback to file based logging. + return NewLogger("base", config) + } + return nil, err + } + return sysLogger, nil + } else if name == "silent" { + silentLogger := &SilentLogger{} + return silentLogger, nil + } else if name == "" || name == "default" || name == "base" { baseLogger, err := newBaseLogger(LogFileConfig{ LogFile: config.FilePath, LogLevel: config.Level, @@ -54,20 +68,6 @@ func NewLogger(name string, config common.LogConfig) (Logger, error) { return nil, err } return baseLogger, nil - } else if name == "silent" { - silentLogger := &SilentLogger{} - return silentLogger, nil - } else if name == "" || name == "default" || name == "syslog" { - sysLogger, err := newSysLogger(config.Level, config.Tag) - if err != nil { - if err == NoSyslogService { - // Syslog service does not exists on this system - // fallback to file based logging. - return NewLogger("base", config) - } - return nil, err - } - return sysLogger, nil } return nil, errors.New("invalid logger type") } diff --git a/common/log/logger_windows.go b/common/log/logger_windows.go index 1f6982d47..5c73e39d2 100644 --- a/common/log/logger_windows.go +++ b/common/log/logger_windows.go @@ -42,7 +42,17 @@ func NewLogger(name string, config common.LogConfig) (Logger, error) { config.Tag = common.FileSystemName } - if name == "base" { + if name == "syslog" { + sysLogger, err := newSysLogger(config.Level, config.Tag) + if err != nil { + //NoSyslogService + return NewLogger("base", config) + } + return sysLogger, nil + } else if name == "silent" { + silentLogger := &SilentLogger{} + return silentLogger, nil + } else if name == "" || name == "default" || name == "base" { baseLogger, err := newBaseLogger(LogFileConfig{ LogFile: config.FilePath, LogLevel: config.Level, @@ -54,16 +64,6 @@ func NewLogger(name string, config common.LogConfig) (Logger, error) { return nil, err } return baseLogger, nil - } else if name == "silent" { - silentLogger := &SilentLogger{} - return silentLogger, nil - } else if name == "" || name == "default" || name == "syslog" { - sysLogger, err := newSysLogger(config.Level, config.Tag) - if err != nil { - //NoSyslogService - return NewLogger("base", config) - } - return sysLogger, nil } return nil, errors.New("invalid logger type") } diff --git a/common/types.go b/common/types.go index 03d72cfc2..6caef7522 100644 --- a/common/types.go +++ b/common/types.go @@ -59,7 +59,7 @@ const ( MbToBytes = 1024 * 1024 GbToBytes = 1024 * 1024 * 1024 TbToBytes = 1024 * 1024 * 1024 * 1024 - DefaultCapacityMb = TbToBytes / MbToBytes + DefaultCapacityMb = 1024 * TbToBytes / MbToBytes // 1 PB CfuseStats = "cloudfuse_stats" FuseAllowedFlags = "invalid FUSE options. Allowed FUSE configurations are: `-o attr_timeout=TIMEOUT`, `-o negative_timeout=TIMEOUT`, `-o entry_timeout=TIMEOUT` `-o allow_other`, `-o allow_root`, `-o umask=PERMISSIONS -o default_permissions`, `-o ro`" diff --git a/component/file_cache/file_cache.go b/component/file_cache/file_cache.go index 72517c47f..9a51f100b 100644 --- a/component/file_cache/file_cache.go +++ b/component/file_cache/file_cache.go @@ -121,7 +121,7 @@ const ( defaultMaxEviction = 5000 defaultMaxThreshold = 80 defaultMinThreshold = 60 - defaultFileCacheTimeout = 120 + defaultFileCacheTimeout = 216000 minimumFileCacheTimeout = 1 defaultCacheUpdateCount = 100 MB = 1024 * 1024 diff --git a/doc/cloudfuse_mount.md b/doc/cloudfuse_mount.md index 617072878..04e8aadcc 100644 --- a/doc/cloudfuse_mount.md +++ b/doc/cloudfuse_mount.md @@ -31,7 +31,7 @@ cloudfuse mount [flags] --cpk-enabled Enable client provided key. --disable-compression Disable transport layer compression. --disable-writeback-cache Disallow libfuse to buffer write requests if you must strictly open files in O_WRONLY or O_APPEND mode. - --display-capacity-mb uint Storage capacity to display. (default 1048576) + --display-capacity-mb uint Storage capacity to display. (default 1073741824) --dry-run Test mount configuration, credentials, etc., but don't make any changes to the container or the local file system. Implies foreground. --enable-symlinks whether or not symlinks should be supported --entry-timeout uint32 The entry timeout in seconds. @@ -45,7 +45,7 @@ cloudfuse mount [flags] --lazy-write Async write to storage container after file handle is closed. --log-file-path string Configures the path for log files. Default is $HOME/.cloudfuse/cloudfuse.log (default "$HOME/.cloudfuse/cloudfuse.log") --log-level string Enables logs written to syslog. Set to LOG_WARNING by default. Allowed values are LOG_OFF|LOG_CRIT|LOG_ERR|LOG_WARNING|LOG_INFO|LOG_DEBUG (default "LOG_WARNING") - --log-type string Type of logger to be used by the system. Set to syslog by default. Allowed values are silent|syslog|base. (default "syslog") + --log-type string Type of logger to be used by the system. Set to syslog by default. Allowed values are silent|syslog|base. (default "base") --low-disk-threshold uint32 percentage of cache utilization which stops early eviction started by high-disk-threshold (default 80) --negative-timeout uint32 The negative entry timeout in seconds. --network-share Run as a network share. Only supported on Windows. @@ -70,8 +70,8 @@ cloudfuse mount [flags] ### SEE ALSO -* [cloudfuse](cloudfuse.md) - Cloudfuse is an open source project developed to provide a virtual filesystem backed by cloud storage. -* [cloudfuse mount all](cloudfuse_mount_all.md) - Mounts all containers for a given cloud account as a filesystem -* [cloudfuse mount list](cloudfuse_mount_list.md) - List all cloudfuse mountpoints +* [cloudfuse](cloudfuse.md) - Cloudfuse is an open source project developed to provide a virtual filesystem backed by cloud storage. +* [cloudfuse mount all](cloudfuse_mount_all.md) - Mounts all containers for a given cloud account as a filesystem +* [cloudfuse mount list](cloudfuse_mount_list.md) - List all cloudfuse mountpoints ###### Auto generated by spf13/cobra on 1-Nov-2024 diff --git a/doc/cloudfuse_mount_all.md b/doc/cloudfuse_mount_all.md index 91cc649c0..8effbca93 100644 --- a/doc/cloudfuse_mount_all.md +++ b/doc/cloudfuse_mount_all.md @@ -38,7 +38,7 @@ cloudfuse mount all [flags] --disable-compression Disable transport layer compression. --disable-version-check To disable version check that is performed automatically --disable-writeback-cache Disallow libfuse to buffer write requests if you must strictly open files in O_WRONLY or O_APPEND mode. - --display-capacity-mb uint Storage capacity to display. (default 1048576) + --display-capacity-mb uint Storage capacity to display. (default 1073741824) --enable-symlinks whether or not symlinks should be supported --entry-timeout uint32 The entry timeout in seconds. --file-cache-timeout uint32 file cache timeout (default 120) @@ -50,7 +50,7 @@ cloudfuse mount all [flags] --lazy-write Async write to storage container after file handle is closed. --log-file-path string Configures the path for log files. Default is /$HOME/.cloudfuse/cloudfuse.log (default "$HOME/.cloudfuse/cloudfuse.log") --log-level string Enables logs written to syslog. Set to LOG_WARNING by default. Allowed values are LOG_OFF|LOG_CRIT|LOG_ERR|LOG_WARNING|LOG_INFO|LOG_DEBUG (default "LOG_WARNING") - --log-type string Type of logger to be used by the system. Set to syslog by default. Allowed values are silent|syslog|base. (default "syslog") + --log-type string Type of logger to be used by the system. Set to syslog by default. Allowed values are silent|syslog|base. (default "base") --low-disk-threshold uint32 percentage of cache utilization which stops early eviction started by high-disk-threshold (default 80) --negative-timeout uint32 The negative entry timeout in seconds. --network-share Run as a network share. Only supported on Windows. diff --git a/doc/cloudfuse_mount_list.md b/doc/cloudfuse_mount_list.md index 0d45070cc..9e3166505 100644 --- a/doc/cloudfuse_mount_list.md +++ b/doc/cloudfuse_mount_list.md @@ -44,7 +44,7 @@ cloudfuse mount list --disable-compression Disable transport layer compression. --disable-version-check To disable version check that is performed automatically --disable-writeback-cache Disallow libfuse to buffer write requests if you must strictly open files in O_WRONLY or O_APPEND mode. - --display-capacity-mb uint Storage capacity to display. (default 1048576) + --display-capacity-mb uint Storage capacity to display. (default 1073741824) --enable-symlinks whether or not symlinks should be supported --entry-timeout uint32 The entry timeout in seconds. --file-cache-timeout uint32 file cache timeout (default 120) @@ -56,7 +56,7 @@ cloudfuse mount list --lazy-write Async write to storage container after file handle is closed. --log-file-path string Configures the path for log files. Default is $HOME/.cloudfuse/cloudfuse.log (default "$HOME/.cloudfuse/cloudfuse.log") --log-level string Enables logs written to syslog. Set to LOG_WARNING by default. Allowed values are LOG_OFF|LOG_CRIT|LOG_ERR|LOG_WARNING|LOG_INFO|LOG_DEBUG (default "LOG_WARNING") - --log-type string Type of logger to be used by the system. Set to syslog by default. Allowed values are silent|syslog|base. (default "syslog") + --log-type string Type of logger to be used by the system. Set to syslog by default. Allowed values are silent|syslog|base. (default "base") --low-disk-threshold uint32 percentage of cache utilization which stops early eviction started by high-disk-threshold (default 80) --negative-timeout uint32 The negative entry timeout in seconds. --network-share Run as a network share. Only supported on Windows. @@ -75,6 +75,6 @@ cloudfuse mount list ### SEE ALSO -* [cloudfuse mount](cloudfuse_mount.md) - Mount the container as a filesystem +* [cloudfuse mount](cloudfuse_mount.md) - Mount the container as a filesystem ###### Auto generated by spf13/cobra on 1-Nov-2024 diff --git a/gui/azure_config_advanced.py b/gui/azure_config_advanced.py index aae66de7e..dbc45c74b 100644 --- a/gui/azure_config_advanced.py +++ b/gui/azure_config_advanced.py @@ -27,7 +27,6 @@ from ui_azure_config_advanced import Ui_Form from common_qt_functions import widgetCustomFunctions -file_cache_eviction_choices = ['lru','lfu'] az_blob_tier = ['none','hot','cool','archive'] class azureAdvancedSettingsWidget(widgetCustomFunctions, Ui_Form): @@ -99,7 +98,6 @@ def populateOptions(self): self.lineEdit_azure_authResource.setText(azStorage['auth-resource']) self.dropDown_azure_blobTier.setCurrentIndex(az_blob_tier.index(azStorage['tier'])) - self.dropDown_fileCache_evictionPolicy.setCurrentIndex(file_cache_eviction_choices.index(fileCache['policy'])) if platform == 'win32': self.checkBox_libfuse_networkshare.setToolTip('Runs as a network share - may improve performance when latency to cloud is high.') diff --git a/gui/azure_config_advanced.ui b/gui/azure_config_advanced.ui index 095b1185b..ec3682b3c 100644 --- a/gui/azure_config_advanced.ui +++ b/gui/azure_config_advanced.ui @@ -117,16 +117,6 @@ - - - - <html><head/><body><p>Eviction policy to be engaged for cache eviction:</p><p>LRU = Clear the <span style=" text-decoration: underline;">L</span>east <span style=" text-decoration: underline;">R</span>ecently <span style=" text-decoration: underline;">U</span>sed file next</p><p>LFU = Cear the <span style=" text-decoration: underline;">L</span>east <span style=" text-decoration: underline;">F</span>requently <span style=" text-decoration: underline;">U</span>sed file next</p></body></html> - - - Eviction Policy - - - diff --git a/gui/azure_config_advanced_ui.py b/gui/azure_config_advanced_ui.py new file mode 100644 index 000000000..d47293994 --- /dev/null +++ b/gui/azure_config_advanced_ui.py @@ -0,0 +1,607 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'azure_config_advanced.ui' +## +## Created by: Qt User Interface Compiler version 6.8.2 +## +## WARNING! All changes made in this file will be lost when recompiling UI file! +################################################################################ + +from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale, + QMetaObject, QObject, QPoint, QRect, + QSize, QTime, QUrl, Qt) +from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, + QFont, QFontDatabase, QGradient, QIcon, + QImage, QKeySequence, QLinearGradient, QPainter, + QPalette, QPixmap, QRadialGradient, QTransform) +from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QGridLayout, + QGroupBox, QHBoxLayout, QLabel, QLineEdit, + QPushButton, QSizePolicy, QSpinBox, QVBoxLayout, + QWidget) + +class Ui_Form(object): + def setupUi(self, Form): + if not Form.objectName(): + Form.setObjectName(u'Form') + Form.resize(792, 706) + self.gridLayout = QGridLayout(Form) + self.gridLayout.setObjectName(u'gridLayout') + self.groupBox_libfuse = QGroupBox(Form) + self.groupBox_libfuse.setObjectName(u'groupBox_libfuse') + self.groupBox_libfuse.setMinimumSize(QSize(450, 125)) + self.verticalLayoutWidget = QWidget(self.groupBox_libfuse) + self.verticalLayoutWidget.setObjectName(u'verticalLayoutWidget') + self.verticalLayoutWidget.setGeometry(QRect(10, 30, 421, 98)) + self.verticalLayout = QVBoxLayout(self.verticalLayoutWidget) + self.verticalLayout.setObjectName(u'verticalLayout') + self.verticalLayout.setContentsMargins(0, 0, 0, 0) + self.horizontalLayout = QHBoxLayout() + self.horizontalLayout.setObjectName(u'horizontalLayout') + self.label = QLabel(self.verticalLayoutWidget) + self.label.setObjectName(u'label') + + self.horizontalLayout.addWidget(self.label) + + self.spinBox_libfuse_maxFuseThreads = QSpinBox(self.verticalLayoutWidget) + self.spinBox_libfuse_maxFuseThreads.setObjectName(u'spinBox_libfuse_maxFuseThreads') + self.spinBox_libfuse_maxFuseThreads.setMinimumSize(QSize(120, 0)) + self.spinBox_libfuse_maxFuseThreads.setMaximumSize(QSize(16777215, 16777215)) + self.spinBox_libfuse_maxFuseThreads.setFocusPolicy(Qt.NoFocus) + self.spinBox_libfuse_maxFuseThreads.setMaximum(2147483647) + self.spinBox_libfuse_maxFuseThreads.setSingleStep(20) + self.spinBox_libfuse_maxFuseThreads.setValue(128) + + self.horizontalLayout.addWidget(self.spinBox_libfuse_maxFuseThreads) + + + self.verticalLayout.addLayout(self.horizontalLayout) + + self.horizontalLayout_3 = QHBoxLayout() + self.horizontalLayout_3.setObjectName(u'horizontalLayout_3') + self.checkBox_libfuse_networkshare = QCheckBox(self.verticalLayoutWidget) + self.checkBox_libfuse_networkshare.setObjectName(u'checkBox_libfuse_networkshare') + + self.horizontalLayout_3.addWidget(self.checkBox_libfuse_networkshare) + + self.checkBox_libfuse_disableWriteback = QCheckBox(self.verticalLayoutWidget) + self.checkBox_libfuse_disableWriteback.setObjectName(u'checkBox_libfuse_disableWriteback') + + self.horizontalLayout_3.addWidget(self.checkBox_libfuse_disableWriteback) + + + self.verticalLayout.addLayout(self.horizontalLayout_3) + + + self.gridLayout.addWidget(self.groupBox_libfuse, 1, 0, 1, 1) + + self.groupbox_fileCache = QGroupBox(Form) + self.groupbox_fileCache.setObjectName(u'groupbox_fileCache') + self.gridLayout_2 = QGridLayout(self.groupbox_fileCache) + self.gridLayout_2.setObjectName(u'gridLayout_2') + self.verticalLayout_9 = QVBoxLayout() + self.verticalLayout_9.setObjectName(u'verticalLayout_9') + self.horizontalLayout_7 = QHBoxLayout() + self.horizontalLayout_7.setObjectName(u'horizontalLayout_7') + self.verticalLayout_8 = QVBoxLayout() + self.verticalLayout_8.setObjectName(u'verticalLayout_8') + self.label_15 = QLabel(self.groupbox_fileCache) + self.label_15.setObjectName(u'label_15') + + self.verticalLayout_8.addWidget(self.label_15) + + self.label_16 = QLabel(self.groupbox_fileCache) + self.label_16.setObjectName(u'label_16') + + self.verticalLayout_8.addWidget(self.label_16) + + self.label_17 = QLabel(self.groupbox_fileCache) + self.label_17.setObjectName(u'label_17') + + self.verticalLayout_8.addWidget(self.label_17) + + self.label_18 = QLabel(self.groupbox_fileCache) + self.label_18.setObjectName(u'label_18') + + self.verticalLayout_8.addWidget(self.label_18) + + self.label_19 = QLabel(self.groupbox_fileCache) + self.label_19.setObjectName(u'label_19') + + self.verticalLayout_8.addWidget(self.label_19) + + self.label_2 = QLabel(self.groupbox_fileCache) + self.label_2.setObjectName(u'label_2') + + self.verticalLayout_8.addWidget(self.label_2) + + + self.horizontalLayout_7.addLayout(self.verticalLayout_8) + + self.verticalLayout_7 = QVBoxLayout() + self.verticalLayout_7.setObjectName(u'verticalLayout_7') + self.dropDown_fileCache_evictionPolicy = QComboBox(self.groupbox_fileCache) + self.dropDown_fileCache_evictionPolicy.addItem('') + self.dropDown_fileCache_evictionPolicy.addItem('') + self.dropDown_fileCache_evictionPolicy.setObjectName(u'dropDown_fileCache_evictionPolicy') + + self.verticalLayout_7.addWidget(self.dropDown_fileCache_evictionPolicy) + + self.spinBox_fileCache_evictionTimeout = QSpinBox(self.groupbox_fileCache) + self.spinBox_fileCache_evictionTimeout.setObjectName(u'spinBox_fileCache_evictionTimeout') + self.spinBox_fileCache_evictionTimeout.setMaximum(2147483647) + self.spinBox_fileCache_evictionTimeout.setValue(120) + + self.verticalLayout_7.addWidget(self.spinBox_fileCache_evictionTimeout) + + self.spinBox_fileCache_maxEviction = QSpinBox(self.groupbox_fileCache) + self.spinBox_fileCache_maxEviction.setObjectName(u'spinBox_fileCache_maxEviction') + self.spinBox_fileCache_maxEviction.setMaximum(2147483647) + self.spinBox_fileCache_maxEviction.setValue(5000) + + self.verticalLayout_7.addWidget(self.spinBox_fileCache_maxEviction) + + self.spinBox_fileCache_maxCacheSize = QSpinBox(self.groupbox_fileCache) + self.spinBox_fileCache_maxCacheSize.setObjectName(u'spinBox_fileCache_maxCacheSize') + self.spinBox_fileCache_maxCacheSize.setMaximum(2147483647) + + self.verticalLayout_7.addWidget(self.spinBox_fileCache_maxCacheSize) + + self.spinBox_fileCache_evictMaxThresh = QSpinBox(self.groupbox_fileCache) + self.spinBox_fileCache_evictMaxThresh.setObjectName(u'spinBox_fileCache_evictMaxThresh') + self.spinBox_fileCache_evictMaxThresh.setMaximum(2147483647) + self.spinBox_fileCache_evictMaxThresh.setValue(80) + + self.verticalLayout_7.addWidget(self.spinBox_fileCache_evictMaxThresh) + + self.spinBox_fileCache_evictMinThresh = QSpinBox(self.groupbox_fileCache) + self.spinBox_fileCache_evictMinThresh.setObjectName(u'spinBox_fileCache_evictMinThresh') + self.spinBox_fileCache_evictMinThresh.setMaximum(2147483647) + self.spinBox_fileCache_evictMinThresh.setValue(60) + + self.verticalLayout_7.addWidget(self.spinBox_fileCache_evictMinThresh) + + self.spinBox_fileCache_refreshSec = QSpinBox(self.groupbox_fileCache) + self.spinBox_fileCache_refreshSec.setObjectName(u'spinBox_fileCache_refreshSec') + self.spinBox_fileCache_refreshSec.setMaximum(2147483647) + self.spinBox_fileCache_refreshSec.setSingleStep(20) + self.spinBox_fileCache_refreshSec.setValue(60) + + self.verticalLayout_7.addWidget(self.spinBox_fileCache_refreshSec) + + + self.horizontalLayout_7.addLayout(self.verticalLayout_7) + + + self.verticalLayout_9.addLayout(self.horizontalLayout_7) + + self.checkBox_fileCache_allowNonEmptyTmp = QCheckBox(self.groupbox_fileCache) + self.checkBox_fileCache_allowNonEmptyTmp.setObjectName(u'checkBox_fileCache_allowNonEmptyTmp') + + self.verticalLayout_9.addWidget(self.checkBox_fileCache_allowNonEmptyTmp) + + self.checkBox_fileCache_policyLogs = QCheckBox(self.groupbox_fileCache) + self.checkBox_fileCache_policyLogs.setObjectName(u'checkBox_fileCache_policyLogs') + + self.verticalLayout_9.addWidget(self.checkBox_fileCache_policyLogs) + + self.checkBox_fileCache_createEmptyFile = QCheckBox(self.groupbox_fileCache) + self.checkBox_fileCache_createEmptyFile.setObjectName(u'checkBox_fileCache_createEmptyFile') + + self.verticalLayout_9.addWidget(self.checkBox_fileCache_createEmptyFile) + + self.checkBox_fileCache_cleanupStart = QCheckBox(self.groupbox_fileCache) + self.checkBox_fileCache_cleanupStart.setObjectName(u'checkBox_fileCache_cleanupStart') + + self.verticalLayout_9.addWidget(self.checkBox_fileCache_cleanupStart) + + self.checkBox_fileCache_offloadIO = QCheckBox(self.groupbox_fileCache) + self.checkBox_fileCache_offloadIO.setObjectName(u'checkBox_fileCache_offloadIO') + + self.verticalLayout_9.addWidget(self.checkBox_fileCache_offloadIO) + + self.checkBox_fileCache_syncToFlush = QCheckBox(self.groupbox_fileCache) + self.checkBox_fileCache_syncToFlush.setObjectName(u'checkBox_fileCache_syncToFlush') + + self.verticalLayout_9.addWidget(self.checkBox_fileCache_syncToFlush) + + + self.gridLayout_2.addLayout(self.verticalLayout_9, 0, 0, 1, 1) + + + self.gridLayout.addWidget(self.groupbox_fileCache, 0, 0, 1, 1) + + self.button_resetDefaultSettings = QPushButton(Form) + self.button_resetDefaultSettings.setObjectName(u'button_resetDefaultSettings') + self.button_resetDefaultSettings.setEnabled(True) + self.button_resetDefaultSettings.setMaximumSize(QSize(165, 16777215)) + self.button_resetDefaultSettings.setLayoutDirection(Qt.LeftToRight) + + self.gridLayout.addWidget(self.button_resetDefaultSettings, 3, 0, 1, 1) + + self.groupbox_azure = QGroupBox(Form) + self.groupbox_azure.setObjectName(u'groupbox_azure') + self.groupbox_azure.setCheckable(False) + self.groupbox_azure.setChecked(False) + self.gridLayout_3 = QGridLayout(self.groupbox_azure) + self.gridLayout_3.setObjectName(u'gridLayout_3') + self.horizontalLayout_20 = QHBoxLayout() + self.horizontalLayout_20.setObjectName(u'horizontalLayout_20') + self.verticalLayout_15 = QVBoxLayout() + self.verticalLayout_15.setObjectName(u'verticalLayout_15') + self.label_30 = QLabel(self.groupbox_azure) + self.label_30.setObjectName(u'label_30') + + self.verticalLayout_15.addWidget(self.label_30) + + self.label_31 = QLabel(self.groupbox_azure) + self.label_31.setObjectName(u'label_31') + + self.verticalLayout_15.addWidget(self.label_31) + + self.label_32 = QLabel(self.groupbox_azure) + self.label_32.setObjectName(u'label_32') + + self.verticalLayout_15.addWidget(self.label_32) + + self.label_33 = QLabel(self.groupbox_azure) + self.label_33.setObjectName(u'label_33') + + self.verticalLayout_15.addWidget(self.label_33) + + self.label_34 = QLabel(self.groupbox_azure) + self.label_34.setObjectName(u'label_34') + + self.verticalLayout_15.addWidget(self.label_34) + + self.label_35 = QLabel(self.groupbox_azure) + self.label_35.setObjectName(u'label_35') + + self.verticalLayout_15.addWidget(self.label_35) + + self.label_36 = QLabel(self.groupbox_azure) + self.label_36.setObjectName(u'label_36') + + self.verticalLayout_15.addWidget(self.label_36) + + self.label_37 = QLabel(self.groupbox_azure) + self.label_37.setObjectName(u'label_37') + + self.verticalLayout_15.addWidget(self.label_37) + + self.label_38 = QLabel(self.groupbox_azure) + self.label_38.setObjectName(u'label_38') + + self.verticalLayout_15.addWidget(self.label_38) + + self.label_39 = QLabel(self.groupbox_azure) + self.label_39.setObjectName(u'label_39') + + self.verticalLayout_15.addWidget(self.label_39) + + self.label_40 = QLabel(self.groupbox_azure) + self.label_40.setObjectName(u'label_40') + + self.verticalLayout_15.addWidget(self.label_40) + + self.label_41 = QLabel(self.groupbox_azure) + self.label_41.setObjectName(u'label_41') + + self.verticalLayout_15.addWidget(self.label_41) + + self.label_42 = QLabel(self.groupbox_azure) + self.label_42.setObjectName(u'label_42') + + self.verticalLayout_15.addWidget(self.label_42) + + + self.horizontalLayout_20.addLayout(self.verticalLayout_15) + + self.verticalLayout_16 = QVBoxLayout() + self.verticalLayout_16.setObjectName(u'verticalLayout_16') + self.lineEdit_azure_aadEndpoint = QLineEdit(self.groupbox_azure) + self.lineEdit_azure_aadEndpoint.setObjectName(u'lineEdit_azure_aadEndpoint') + + self.verticalLayout_16.addWidget(self.lineEdit_azure_aadEndpoint) + + self.lineEdit_azure_subDirectory = QLineEdit(self.groupbox_azure) + self.lineEdit_azure_subDirectory.setObjectName(u'lineEdit_azure_subDirectory') + + self.verticalLayout_16.addWidget(self.lineEdit_azure_subDirectory) + + self.spinBox_azure_blockSize = QSpinBox(self.groupbox_azure) + self.spinBox_azure_blockSize.setObjectName(u'spinBox_azure_blockSize') + self.spinBox_azure_blockSize.setMaximum(2147483647) + self.spinBox_azure_blockSize.setValue(16) + + self.verticalLayout_16.addWidget(self.spinBox_azure_blockSize) + + self.spinBox_azure_maxConcurrency = QSpinBox(self.groupbox_azure) + self.spinBox_azure_maxConcurrency.setObjectName(u'spinBox_azure_maxConcurrency') + self.spinBox_azure_maxConcurrency.setMaximum(2147483647) + self.spinBox_azure_maxConcurrency.setValue(32) + + self.verticalLayout_16.addWidget(self.spinBox_azure_maxConcurrency) + + self.dropDown_azure_blobTier = QComboBox(self.groupbox_azure) + self.dropDown_azure_blobTier.addItem('') + self.dropDown_azure_blobTier.addItem('') + self.dropDown_azure_blobTier.addItem('') + self.dropDown_azure_blobTier.addItem('') + self.dropDown_azure_blobTier.setObjectName(u'dropDown_azure_blobTier') + + self.verticalLayout_16.addWidget(self.dropDown_azure_blobTier) + + self.spinBox_azure_blockOnMount = QSpinBox(self.groupbox_azure) + self.spinBox_azure_blockOnMount.setObjectName(u'spinBox_azure_blockOnMount') + self.spinBox_azure_blockOnMount.setMaximum(2147483647) + + self.verticalLayout_16.addWidget(self.spinBox_azure_blockOnMount) + + self.spinBox_azure_maxRetries = QSpinBox(self.groupbox_azure) + self.spinBox_azure_maxRetries.setObjectName(u'spinBox_azure_maxRetries') + self.spinBox_azure_maxRetries.setMaximum(2147483647) + self.spinBox_azure_maxRetries.setValue(5) + + self.verticalLayout_16.addWidget(self.spinBox_azure_maxRetries) + + self.spinBox_azure_maxRetryTimeout = QSpinBox(self.groupbox_azure) + self.spinBox_azure_maxRetryTimeout.setObjectName(u'spinBox_azure_maxRetryTimeout') + self.spinBox_azure_maxRetryTimeout.setMaximum(2147483647) + self.spinBox_azure_maxRetryTimeout.setValue(900) + + self.verticalLayout_16.addWidget(self.spinBox_azure_maxRetryTimeout) + + self.spinBox_azure_retryBackoff = QSpinBox(self.groupbox_azure) + self.spinBox_azure_retryBackoff.setObjectName(u'spinBox_azure_retryBackoff') + self.spinBox_azure_retryBackoff.setMaximum(2147483647) + self.spinBox_azure_retryBackoff.setValue(4) + + self.verticalLayout_16.addWidget(self.spinBox_azure_retryBackoff) + + self.spinBox_azure_maxRetryDelay = QSpinBox(self.groupbox_azure) + self.spinBox_azure_maxRetryDelay.setObjectName(u'spinBox_azure_maxRetryDelay') + self.spinBox_azure_maxRetryDelay.setMaximum(2147483647) + self.spinBox_azure_maxRetryDelay.setValue(60) + + self.verticalLayout_16.addWidget(self.spinBox_azure_maxRetryDelay) + + self.lineEdit_azure_httpProxy = QLineEdit(self.groupbox_azure) + self.lineEdit_azure_httpProxy.setObjectName(u'lineEdit_azure_httpProxy') + + self.verticalLayout_16.addWidget(self.lineEdit_azure_httpProxy) + + self.lineEdit_azure_httpsProxy = QLineEdit(self.groupbox_azure) + self.lineEdit_azure_httpsProxy.setObjectName(u'lineEdit_azure_httpsProxy') + + self.verticalLayout_16.addWidget(self.lineEdit_azure_httpsProxy) + + self.lineEdit_azure_authResource = QLineEdit(self.groupbox_azure) + self.lineEdit_azure_authResource.setObjectName(u'lineEdit_azure_authResource') + + self.verticalLayout_16.addWidget(self.lineEdit_azure_authResource) + + + self.horizontalLayout_20.addLayout(self.verticalLayout_16) + + + self.gridLayout_3.addLayout(self.horizontalLayout_20, 0, 0, 1, 1) + + self.verticalLayout_18 = QVBoxLayout() + self.verticalLayout_18.setObjectName(u'verticalLayout_18') + self.checkBox_azure_useHttp = QCheckBox(self.groupbox_azure) + self.checkBox_azure_useHttp.setObjectName(u'checkBox_azure_useHttp') + + self.verticalLayout_18.addWidget(self.checkBox_azure_useHttp) + + self.checkBox_azure_validateMd5 = QCheckBox(self.groupbox_azure) + self.checkBox_azure_validateMd5.setObjectName(u'checkBox_azure_validateMd5') + + self.verticalLayout_18.addWidget(self.checkBox_azure_validateMd5) + + self.checkBox_azure_updateMd5 = QCheckBox(self.groupbox_azure) + self.checkBox_azure_updateMd5.setObjectName(u'checkBox_azure_updateMd5') + + self.verticalLayout_18.addWidget(self.checkBox_azure_updateMd5) + + self.checkBox_azure_failUnsupportedOps = QCheckBox(self.groupbox_azure) + self.checkBox_azure_failUnsupportedOps.setObjectName(u'checkBox_azure_failUnsupportedOps') + + self.verticalLayout_18.addWidget(self.checkBox_azure_failUnsupportedOps) + + self.checkBox_azure_sdkTrace = QCheckBox(self.groupbox_azure) + self.checkBox_azure_sdkTrace.setObjectName(u'checkBox_azure_sdkTrace') + + self.verticalLayout_18.addWidget(self.checkBox_azure_sdkTrace) + + self.checkBox_azure_virtualDirectory = QCheckBox(self.groupbox_azure) + self.checkBox_azure_virtualDirectory.setObjectName(u'checkBox_azure_virtualDirectory') + + self.verticalLayout_18.addWidget(self.checkBox_azure_virtualDirectory) + + self.checkBox_azure_disableCompression = QCheckBox(self.groupbox_azure) + self.checkBox_azure_disableCompression.setObjectName(u'checkBox_azure_disableCompression') + + self.verticalLayout_18.addWidget(self.checkBox_azure_disableCompression) + + + self.gridLayout_3.addLayout(self.verticalLayout_18, 1, 0, 1, 1) + + + self.gridLayout.addWidget(self.groupbox_azure, 0, 1, 2, 1) + + self.button_okay = QPushButton(Form) + self.button_okay.setObjectName(u'button_okay') + self.button_okay.setMaximumSize(QSize(100, 16777215)) + self.button_okay.setLayoutDirection(Qt.RightToLeft) + + self.gridLayout.addWidget(self.button_okay, 3, 1, 1, 1) + + + self.retranslateUi(Form) + + self.button_resetDefaultSettings.setDefault(False) + + + QMetaObject.connectSlotsByName(Form) + # setupUi + + def retranslateUi(self, Form): + Form.setWindowTitle(QCoreApplication.translate('Form', u'Form', None)) + self.groupBox_libfuse.setTitle(QCoreApplication.translate('Form', u'LibFuse', None)) +#if QT_CONFIG(tooltip) + self.label.setToolTip(QCoreApplication.translate('Form', u'

The number of threads allowed at the libfuse layer for highly parallel operations

', None)) +#endif // QT_CONFIG(tooltip) + self.label.setText(QCoreApplication.translate('Form', u'Maximum Fuse Threads', None)) +#if QT_CONFIG(tooltip) + self.checkBox_libfuse_networkshare.setToolTip(QCoreApplication.translate('Form', u"

Runs as a network share - may improve performance when latency to cloud is high.

ONLY supported on Windows.

", None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_libfuse_networkshare.setText(QCoreApplication.translate('Form', u'Enable network-share', None)) +#if QT_CONFIG(tooltip) + self.checkBox_libfuse_disableWriteback.setToolTip(QCoreApplication.translate('Form', u'

Dis-allow libfuse to buffer write requests if one must stricty open files in write only or append mode. Alternatively, just set ignore open flags in general settings

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_libfuse_disableWriteback.setText(QCoreApplication.translate('Form', u'Disable write-back cache', None)) + self.groupbox_fileCache.setTitle(QCoreApplication.translate('Form', u'File Caching', None)) +#if QT_CONFIG(tooltip) + self.label_15.setToolTip(QCoreApplication.translate('Form', u'

The amount of time (seconds) set to for eviction in the cache

', None)) +#endif // QT_CONFIG(tooltip) + self.label_15.setText(QCoreApplication.translate('Form', u'Eviction Timeout (s)', None)) +#if QT_CONFIG(tooltip) + self.label_16.setToolTip(QCoreApplication.translate('Form', u'

The number of files that can be evicted at once - default 5,000

', None)) +#endif // QT_CONFIG(tooltip) + self.label_16.setText(QCoreApplication.translate('Form', u'Max Eviction', None)) +#if QT_CONFIG(tooltip) + self.label_17.setToolTip(QCoreApplication.translate('Form', u'

The maximum cache size allowed in MB - set to zero for unlimited

', None)) +#endif // QT_CONFIG(tooltip) + self.label_17.setText(QCoreApplication.translate('Form', u'Max Cache Size (MB)', None)) +#if QT_CONFIG(tooltip) + self.label_18.setToolTip(QCoreApplication.translate('Form', u'

The percentage of disk space consumed when the eviction is triggers. This parameter overrides the eviction timeout parameter and cached files will be removed even if they have not expired.

', None)) +#endif // QT_CONFIG(tooltip) + self.label_18.setText(QCoreApplication.translate('Form', u'Eviction Max Threshold (%)', None)) +#if QT_CONFIG(tooltip) + self.label_19.setToolTip(QCoreApplication.translate('Form', u'

The percentage of disk space consumed which triggers the eviction to STOP evicting files when previously triggered by the high-threshold setting.

', None)) +#endif // QT_CONFIG(tooltip) + self.label_19.setText(QCoreApplication.translate('Form', u'Eviction Min Threshold (%)', None)) +#if QT_CONFIG(tooltip) + self.label_2.setToolTip(QCoreApplication.translate('Form', u"

The time (in seconds) between checks to see if a file in the local cache is up to date with the container's latest copy.

", None)) +#endif // QT_CONFIG(tooltip) + self.label_2.setText(QCoreApplication.translate('Form', u'Cache Update File Timeout(s)', None)) + self.dropDown_fileCache_evictionPolicy.setItemText(0, QCoreApplication.translate('Form', u'lru - least recently used', None)) + self.dropDown_fileCache_evictionPolicy.setItemText(1, QCoreApplication.translate('Form', u'lfu - least frequently used', None)) + +#if QT_CONFIG(tooltip) + self.checkBox_fileCache_allowNonEmptyTmp.setToolTip(QCoreApplication.translate('Form', u'

Allow a non-empty temp directory at startup

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_fileCache_allowNonEmptyTmp.setText(QCoreApplication.translate('Form', u'Allow non-empty temp', None)) +#if QT_CONFIG(tooltip) + self.checkBox_fileCache_policyLogs.setToolTip(QCoreApplication.translate('Form', u'

Generate eviction policy logs showing which files will expire soon

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_fileCache_policyLogs.setText(QCoreApplication.translate('Form', u'Policy logs', None)) +#if QT_CONFIG(tooltip) + self.checkBox_fileCache_createEmptyFile.setToolTip(QCoreApplication.translate('Form', u'

Create an empty file on the container when create call is received from the kernel

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_fileCache_createEmptyFile.setText(QCoreApplication.translate('Form', u'Create empty file', None)) +#if QT_CONFIG(tooltip) + self.checkBox_fileCache_cleanupStart.setToolTip(QCoreApplication.translate('Form', u'

Clean the temp directory on startup if it is not empty already

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_fileCache_cleanupStart.setText(QCoreApplication.translate('Form', u'Cleanup on start', None)) +#if QT_CONFIG(tooltip) + self.checkBox_fileCache_offloadIO.setToolTip(QCoreApplication.translate('Form', u'

By default, the libfuse component will service reads/writes to files for better performance. Check the box to make the file-cache component service read/write calls as well.

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_fileCache_offloadIO.setText(QCoreApplication.translate('Form', u'Offload IO', None)) +#if QT_CONFIG(tooltip) + self.checkBox_fileCache_syncToFlush.setToolTip(QCoreApplication.translate('Form', u'

Sync call to a file will force upload of the contents to the storage account

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_fileCache_syncToFlush.setText(QCoreApplication.translate('Form', u'Sync to flush', None)) +#if QT_CONFIG(tooltip) + self.button_resetDefaultSettings.setToolTip(QCoreApplication.translate('Form', u'

Reset to previous settings - does not take effect until changes are saved

', None)) +#endif // QT_CONFIG(tooltip) + self.button_resetDefaultSettings.setText(QCoreApplication.translate('Form', u'Reset Changes', None)) + self.groupbox_azure.setTitle(QCoreApplication.translate('Form', u'Azure Bucket', None)) +#if QT_CONFIG(tooltip) + self.label_30.setToolTip(QCoreApplication.translate('Form', u'

Storage account custom AAD endpoint

', None)) +#endif // QT_CONFIG(tooltip) + self.label_30.setText(QCoreApplication.translate('Form', u'Aad endpoint', None)) +#if QT_CONFIG(tooltip) + self.label_31.setToolTip(QCoreApplication.translate('Form', u'

Name of the sub-directory to be mounted instead of the whole container

', None)) +#endif // QT_CONFIG(tooltip) + self.label_31.setText(QCoreApplication.translate('Form', u'Subdirectory', None)) +#if QT_CONFIG(tooltip) + self.label_32.setToolTip(QCoreApplication.translate('Form', u'

The size of each block in MB

', None)) +#endif // QT_CONFIG(tooltip) + self.label_32.setText(QCoreApplication.translate('Form', u'Block-size (MB)', None)) +#if QT_CONFIG(tooltip) + self.label_33.setToolTip(QCoreApplication.translate('Form', u'

Number of parallel upload/download threads

', None)) +#endif // QT_CONFIG(tooltip) + self.label_33.setText(QCoreApplication.translate('Form', u'Max concurrency', None)) +#if QT_CONFIG(tooltip) + self.label_34.setToolTip(QCoreApplication.translate('Form', u"

The 'hot-ness' tier to be set while uploading a blob.

Default - None

", None)) +#endif // QT_CONFIG(tooltip) + self.label_34.setText(QCoreApplication.translate('Form', u'Blob tier', None)) +#if QT_CONFIG(tooltip) + self.label_35.setToolTip(QCoreApplication.translate('Form', u'

The time (seconds) the list API is blocked after the mount

', None)) +#endif // QT_CONFIG(tooltip) + self.label_35.setText(QCoreApplication.translate('Form', u'Block on mount (s)', None)) +#if QT_CONFIG(tooltip) + self.label_36.setToolTip(QCoreApplication.translate('Form', u'

The number of retries to attempt for any operation failure

', None)) +#endif // QT_CONFIG(tooltip) + self.label_36.setText(QCoreApplication.translate('Form', u'Max retries', None)) +#if QT_CONFIG(tooltip) + self.label_37.setToolTip(QCoreApplication.translate('Form', u'

The maximum time (seconds) allowed for any given retry

', None)) +#endif // QT_CONFIG(tooltip) + self.label_37.setText(QCoreApplication.translate('Form', u'Max retry timeout (s)', None)) +#if QT_CONFIG(tooltip) + self.label_38.setToolTip(QCoreApplication.translate('Form', u'

The minimum amount of time (seconds) to delay between two retries

', None)) +#endif // QT_CONFIG(tooltip) + self.label_38.setText(QCoreApplication.translate('Form', u'Retry backoff (s)', None)) +#if QT_CONFIG(tooltip) + self.label_39.setToolTip(QCoreApplication.translate('Form', u'

The maximum time (seconds) to delay between two retries

', None)) +#endif // QT_CONFIG(tooltip) + self.label_39.setText(QCoreApplication.translate('Form', u'Max Retry Delay (s)', None)) +#if QT_CONFIG(tooltip) + self.label_40.setToolTip(QCoreApplication.translate('Form', u'

http proxy to be used for connection - [ip-address]:[port]

', None)) +#endif // QT_CONFIG(tooltip) + self.label_40.setText(QCoreApplication.translate('Form', u'Http proxy', None)) +#if QT_CONFIG(tooltip) + self.label_41.setToolTip(QCoreApplication.translate('Form', u'

https proxy to be used for connection - [ip-address]:[port]

', None)) +#endif // QT_CONFIG(tooltip) + self.label_41.setText(QCoreApplication.translate('Form', u'Https proxy', None)) +#if QT_CONFIG(tooltip) + self.label_42.setToolTip(QCoreApplication.translate('Form', u'

The resource string to be used during the OAuth token retrieval

', None)) +#endif // QT_CONFIG(tooltip) + self.label_42.setText(QCoreApplication.translate('Form', u'Auth resource', None)) + self.dropDown_azure_blobTier.setItemText(0, QCoreApplication.translate('Form', u'none', None)) + self.dropDown_azure_blobTier.setItemText(1, QCoreApplication.translate('Form', u'hot', None)) + self.dropDown_azure_blobTier.setItemText(2, QCoreApplication.translate('Form', u'cool', None)) + self.dropDown_azure_blobTier.setItemText(3, QCoreApplication.translate('Form', u'archive', None)) + +#if QT_CONFIG(tooltip) + self.checkBox_azure_useHttp.setToolTip(QCoreApplication.translate('Form', u'

Use http instead of https

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_azure_useHttp.setText(QCoreApplication.translate('Form', u'Use http', None)) +#if QT_CONFIG(tooltip) + self.checkBox_azure_validateMd5.setToolTip(QCoreApplication.translate('Form', u'

Validate the md5 on download - this will impact performance and only works when file-cache is enabled in the pipeline

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_azure_validateMd5.setText(QCoreApplication.translate('Form', u'Validate md5 (file cache only)', None)) +#if QT_CONFIG(tooltip) + self.checkBox_azure_updateMd5.setToolTip(QCoreApplication.translate('Form', u'

Set the md5 sum to upload. Impacts performance and works only when file-cache is enabled in the pipeline

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_azure_updateMd5.setText(QCoreApplication.translate('Form', u'Update md5 (file cache only)', None)) +#if QT_CONFIG(tooltip) + self.checkBox_azure_failUnsupportedOps.setToolTip(QCoreApplication.translate('Form', u'

Return failure for unsupported operations like chmod/chown on block blob accounts

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_azure_failUnsupportedOps.setText(QCoreApplication.translate('Form', u'Fail Unsupported Ops', None)) +#if QT_CONFIG(tooltip) + self.checkBox_azure_sdkTrace.setToolTip(QCoreApplication.translate('Form', u'

Enable the storage SDK logging

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_azure_sdkTrace.setText(QCoreApplication.translate('Form', u'Sdk trace', None)) +#if QT_CONFIG(tooltip) + self.checkBox_azure_virtualDirectory.setToolTip(QCoreApplication.translate('Form', u'

Support virtual directories without existence of special marker blob

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_azure_virtualDirectory.setText(QCoreApplication.translate('Form', u'Virtual directory', None)) +#if QT_CONFIG(tooltip) + self.checkBox_azure_disableCompression.setToolTip(QCoreApplication.translate('Form', u'

Disable the transport layer content encoding like gzip. Check this flag if blobs have content-encoding set in the container

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_azure_disableCompression.setText(QCoreApplication.translate('Form', u'Disable compression', None)) + self.button_okay.setText(QCoreApplication.translate('Form', u'Save', None)) + # retranslateUi diff --git a/gui/common_qt_functions.py b/gui/common_qt_functions.py index 0084c091e..7e95e5828 100644 --- a/gui/common_qt_functions.py +++ b/gui/common_qt_functions.py @@ -31,7 +31,6 @@ from PySide6.QtCore import Qt, QSettings from PySide6.QtGui import QScreen -file_cache_eviction_choices = ['lru','lfu'] libfusePermissions = [0o777,0o666,0o644,0o444] class defaultSettingsManager(): @@ -160,8 +159,7 @@ def setComponentSettings(self, allMountSettings): allMountSettings['file_cache'] = { 'path': '', - 'policy': 'lru', - 'timeout-sec' : 64000000, + 'timeout-sec' : 216000, 'max-eviction': 5000, 'max-size-mb': 0, 'high-threshold': 80, @@ -204,7 +202,7 @@ def setComponentSettings(self, allMountSettings): } allMountSettings['logging'] = { - 'type' : 'syslog', + 'type' : 'base', 'level' : 'log_err', 'file-path' : '$HOME/.cloudfuse/cloudfuse.log', 'max-file-size-mb' : 512, @@ -421,5 +419,4 @@ def updateOptionalFileCache(self): fileCache['low-threshold'] = self.spinBox_fileCache_evictMinThresh.value() fileCache['refresh-sec'] = self.spinBox_fileCache_refreshSec.value() - fileCache['policy'] = file_cache_eviction_choices[self.dropDown_fileCache_evictionPolicy.currentIndex()] self.settings['file_cache'] = fileCache diff --git a/gui/s3_config_advanced.py b/gui/s3_config_advanced.py index c080291f1..1b77324f0 100644 --- a/gui/s3_config_advanced.py +++ b/gui/s3_config_advanced.py @@ -27,8 +27,6 @@ from ui_s3_config_advanced import Ui_Form from common_qt_functions import widgetCustomFunctions -file_cache_eviction_choices = ['lru','lfu'] - class s3AdvancedSettingsWidget(widgetCustomFunctions, Ui_Form): def __init__(self,configSettings): super().__init__() @@ -60,11 +58,6 @@ def populateOptions(self): libfuse = self.settings['libfuse'] s3Storage = self.settings['s3storage'] - # The index of file_cache_eviction is matched with the default - # index values in the ui code, so translate the value from settings to index number - policyIndex = file_cache_eviction_choices.index(fileCache['policy']) - self.dropDown_fileCache_evictionPolicy.setCurrentIndex(policyIndex) - self.setCheckboxFromSetting(self.checkBox_libfuse_disableWriteback, libfuse['disable-writeback-cache']) self.setCheckboxFromSetting(self.checkBox_libfuse_networkshare, libfuse['network-share']) self.setCheckboxFromSetting(self.checkBox_fileCache_allowNonEmptyTmp,fileCache['allow-non-empty-temp']) diff --git a/gui/s3_config_advanced.ui b/gui/s3_config_advanced.ui index 6d2032ac5..3c8e93b72 100644 --- a/gui/s3_config_advanced.ui +++ b/gui/s3_config_advanced.ui @@ -190,16 +190,6 @@ - - - - <html><head/><body><p>Eviction policy to be engaged for cache eviction:</p><p>LRU = Clear the <span style=" text-decoration: underline;">L</span>east <span style=" text-decoration: underline;">R</span>ecently <span style=" text-decoration: underline;">U</span>sed file next</p><p>LFU = Cear the <span style=" text-decoration: underline;">L</span>east <span style=" text-decoration: underline;">F</span>requently <span style=" text-decoration: underline;">U</span>sed file next</p></body></html> - - - Eviction Policy - - - diff --git a/gui/s3_config_advanced_ui.py b/gui/s3_config_advanced_ui.py new file mode 100644 index 000000000..4aee5354d --- /dev/null +++ b/gui/s3_config_advanced_ui.py @@ -0,0 +1,350 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 's3_config_advanced.ui' +## +## Created by: Qt User Interface Compiler version 6.8.2 +## +## WARNING! All changes made in this file will be lost when recompiling UI file! +################################################################################ + +from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale, + QMetaObject, QObject, QPoint, QRect, + QSize, QTime, QUrl, Qt) +from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, + QFont, QFontDatabase, QGradient, QIcon, + QImage, QKeySequence, QLinearGradient, QPainter, + QPalette, QPixmap, QRadialGradient, QTransform) +from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QGridLayout, + QGroupBox, QHBoxLayout, QLabel, QLineEdit, + QPushButton, QSizePolicy, QSpinBox, QVBoxLayout, + QWidget) + +class Ui_Form(object): + def setupUi(self, Form): + if not Form.objectName(): + Form.setObjectName(u'Form') + Form.resize(640, 556) + self.gridLayout = QGridLayout(Form) + self.gridLayout.setObjectName(u'gridLayout') + self.button_resetDefaultSettings = QPushButton(Form) + self.button_resetDefaultSettings.setObjectName(u'button_resetDefaultSettings') + self.button_resetDefaultSettings.setEnabled(True) + self.button_resetDefaultSettings.setMaximumSize(QSize(165, 16777215)) + self.button_resetDefaultSettings.setLayoutDirection(Qt.LeftToRight) + + self.gridLayout.addWidget(self.button_resetDefaultSettings, 7, 0, 1, 1) + + self.button_okay = QPushButton(Form) + self.button_okay.setObjectName(u'button_okay') + self.button_okay.setMaximumSize(QSize(100, 16777215)) + self.button_okay.setLayoutDirection(Qt.RightToLeft) + + self.gridLayout.addWidget(self.button_okay, 7, 1, 1, 1) + + self.groupBox = QGroupBox(Form) + self.groupBox.setObjectName(u'groupBox') + self.groupBox.setMinimumSize(QSize(275, 80)) + self.groupBox.setFlat(False) + self.horizontalLayoutWidget = QWidget(self.groupBox) + self.horizontalLayoutWidget.setObjectName(u'horizontalLayoutWidget') + self.horizontalLayoutWidget.setGeometry(QRect(9, 30, 581, 41)) + self.horizontalLayout = QHBoxLayout(self.horizontalLayoutWidget) + self.horizontalLayout.setObjectName(u'horizontalLayout') + self.horizontalLayout.setContentsMargins(0, 0, 0, 0) + self.label = QLabel(self.horizontalLayoutWidget) + self.label.setObjectName(u'label') + + self.horizontalLayout.addWidget(self.label) + + self.lineEdit_subdirectory = QLineEdit(self.horizontalLayoutWidget) + self.lineEdit_subdirectory.setObjectName(u'lineEdit_subdirectory') + + self.horizontalLayout.addWidget(self.lineEdit_subdirectory) + + + self.gridLayout.addWidget(self.groupBox, 2, 0, 1, 2) + + self.groupbox_fileCache = QGroupBox(Form) + self.groupbox_fileCache.setObjectName(u'groupbox_fileCache') + self.groupbox_fileCache.setEnabled(True) + sizePolicy = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.groupbox_fileCache.sizePolicy().hasHeightForWidth()) + self.groupbox_fileCache.setSizePolicy(sizePolicy) + font = QFont() + font.setKerning(True) + self.groupbox_fileCache.setFont(font) + self.groupbox_fileCache.setAcceptDrops(False) + self.groupbox_fileCache.setAutoFillBackground(False) + self.gridLayout_2 = QGridLayout(self.groupbox_fileCache) + self.gridLayout_2.setObjectName(u'gridLayout_2') + self.verticalLayout_9 = QVBoxLayout() + self.verticalLayout_9.setObjectName(u'verticalLayout_9') + self.checkBox_fileCache_allowNonEmptyTmp = QCheckBox(self.groupbox_fileCache) + self.checkBox_fileCache_allowNonEmptyTmp.setObjectName(u'checkBox_fileCache_allowNonEmptyTmp') + + self.verticalLayout_9.addWidget(self.checkBox_fileCache_allowNonEmptyTmp) + + self.checkBox_fileCache_policyLogs = QCheckBox(self.groupbox_fileCache) + self.checkBox_fileCache_policyLogs.setObjectName(u'checkBox_fileCache_policyLogs') + + self.verticalLayout_9.addWidget(self.checkBox_fileCache_policyLogs) + + self.checkBox_fileCache_createEmptyFile = QCheckBox(self.groupbox_fileCache) + self.checkBox_fileCache_createEmptyFile.setObjectName(u'checkBox_fileCache_createEmptyFile') + + self.verticalLayout_9.addWidget(self.checkBox_fileCache_createEmptyFile) + + self.checkBox_fileCache_cleanupStart = QCheckBox(self.groupbox_fileCache) + self.checkBox_fileCache_cleanupStart.setObjectName(u'checkBox_fileCache_cleanupStart') + + self.verticalLayout_9.addWidget(self.checkBox_fileCache_cleanupStart) + + self.checkBox_fileCache_offloadIO = QCheckBox(self.groupbox_fileCache) + self.checkBox_fileCache_offloadIO.setObjectName(u'checkBox_fileCache_offloadIO') + + self.verticalLayout_9.addWidget(self.checkBox_fileCache_offloadIO) + + self.checkBox_fileCache_syncToFlush = QCheckBox(self.groupbox_fileCache) + self.checkBox_fileCache_syncToFlush.setObjectName(u'checkBox_fileCache_syncToFlush') + + self.verticalLayout_9.addWidget(self.checkBox_fileCache_syncToFlush) + + + self.gridLayout_2.addLayout(self.verticalLayout_9, 0, 0, 1, 1) + + self.horizontalLayout_7 = QHBoxLayout() + self.horizontalLayout_7.setObjectName(u'horizontalLayout_7') + self.verticalLayout_8 = QVBoxLayout() + self.verticalLayout_8.setObjectName(u'verticalLayout_8') + self.label_15 = QLabel(self.groupbox_fileCache) + self.label_15.setObjectName(u'label_15') + + self.verticalLayout_8.addWidget(self.label_15) + + self.label_16 = QLabel(self.groupbox_fileCache) + self.label_16.setObjectName(u'label_16') + + self.verticalLayout_8.addWidget(self.label_16) + + self.label_17 = QLabel(self.groupbox_fileCache) + self.label_17.setObjectName(u'label_17') + + self.verticalLayout_8.addWidget(self.label_17) + + self.label_18 = QLabel(self.groupbox_fileCache) + self.label_18.setObjectName(u'label_18') + + self.verticalLayout_8.addWidget(self.label_18) + + self.label_19 = QLabel(self.groupbox_fileCache) + self.label_19.setObjectName(u'label_19') + + self.verticalLayout_8.addWidget(self.label_19) + + self.label_3 = QLabel(self.groupbox_fileCache) + self.label_3.setObjectName(u'label_3') + + self.verticalLayout_8.addWidget(self.label_3) + + + self.horizontalLayout_7.addLayout(self.verticalLayout_8) + + self.verticalLayout_7 = QVBoxLayout() + self.verticalLayout_7.setObjectName(u'verticalLayout_7') + self.dropDown_fileCache_evictionPolicy = QComboBox(self.groupbox_fileCache) + self.dropDown_fileCache_evictionPolicy.addItem('') + self.dropDown_fileCache_evictionPolicy.addItem('') + self.dropDown_fileCache_evictionPolicy.setObjectName(u'dropDown_fileCache_evictionPolicy') + + self.verticalLayout_7.addWidget(self.dropDown_fileCache_evictionPolicy) + + self.spinBox_fileCache_evictionTimeout = QSpinBox(self.groupbox_fileCache) + self.spinBox_fileCache_evictionTimeout.setObjectName(u'spinBox_fileCache_evictionTimeout') + self.spinBox_fileCache_evictionTimeout.setMaximum(2147483647) + self.spinBox_fileCache_evictionTimeout.setSingleStep(10) + + self.verticalLayout_7.addWidget(self.spinBox_fileCache_evictionTimeout) + + self.spinBox_fileCache_maxEviction = QSpinBox(self.groupbox_fileCache) + self.spinBox_fileCache_maxEviction.setObjectName(u'spinBox_fileCache_maxEviction') + self.spinBox_fileCache_maxEviction.setMaximum(2147483647) + self.spinBox_fileCache_maxEviction.setSingleStep(20) + self.spinBox_fileCache_maxEviction.setValue(0) + + self.verticalLayout_7.addWidget(self.spinBox_fileCache_maxEviction) + + self.spinBox_fileCache_maxCacheSize = QSpinBox(self.groupbox_fileCache) + self.spinBox_fileCache_maxCacheSize.setObjectName(u'spinBox_fileCache_maxCacheSize') + self.spinBox_fileCache_maxCacheSize.setMaximum(2147483647) + self.spinBox_fileCache_maxCacheSize.setSingleStep(100) + + self.verticalLayout_7.addWidget(self.spinBox_fileCache_maxCacheSize) + + self.spinBox_fileCache_evictMaxThresh = QSpinBox(self.groupbox_fileCache) + self.spinBox_fileCache_evictMaxThresh.setObjectName(u'spinBox_fileCache_evictMaxThresh') + self.spinBox_fileCache_evictMaxThresh.setMaximum(2147483647) + self.spinBox_fileCache_evictMaxThresh.setSingleStep(5) + self.spinBox_fileCache_evictMaxThresh.setValue(80) + + self.verticalLayout_7.addWidget(self.spinBox_fileCache_evictMaxThresh) + + self.spinBox_fileCache_evictMinThresh = QSpinBox(self.groupbox_fileCache) + self.spinBox_fileCache_evictMinThresh.setObjectName(u'spinBox_fileCache_evictMinThresh') + self.spinBox_fileCache_evictMinThresh.setMaximum(2147483647) + self.spinBox_fileCache_evictMinThresh.setSingleStep(5) + self.spinBox_fileCache_evictMinThresh.setValue(60) + + self.verticalLayout_7.addWidget(self.spinBox_fileCache_evictMinThresh) + + self.spinBox_fileCache_refreshSec = QSpinBox(self.groupbox_fileCache) + self.spinBox_fileCache_refreshSec.setObjectName(u'spinBox_fileCache_refreshSec') + self.spinBox_fileCache_refreshSec.setMaximum(2147483647) + self.spinBox_fileCache_refreshSec.setSingleStep(20) + self.spinBox_fileCache_refreshSec.setValue(60) + + self.verticalLayout_7.addWidget(self.spinBox_fileCache_refreshSec) + + + self.horizontalLayout_7.addLayout(self.verticalLayout_7) + + + self.gridLayout_2.addLayout(self.horizontalLayout_7, 0, 1, 1, 1) + + + self.gridLayout.addWidget(self.groupbox_fileCache, 1, 0, 1, 2) + + self.groupBox_2 = QGroupBox(Form) + self.groupBox_2.setObjectName(u'groupBox_2') + self.groupBox_2.setMinimumSize(QSize(600, 150)) + self.verticalLayoutWidget = QWidget(self.groupBox_2) + self.verticalLayoutWidget.setObjectName(u'verticalLayoutWidget') + self.verticalLayoutWidget.setGeometry(QRect(10, 20, 581, 121)) + self.verticalLayout = QVBoxLayout(self.verticalLayoutWidget) + self.verticalLayout.setObjectName(u'verticalLayout') + self.verticalLayout.setContentsMargins(0, 0, 0, 0) + self.horizontalLayout_2 = QHBoxLayout() + self.horizontalLayout_2.setObjectName(u'horizontalLayout_2') + self.label_2 = QLabel(self.verticalLayoutWidget) + self.label_2.setObjectName(u'label_2') + + self.horizontalLayout_2.addWidget(self.label_2) + + self.spinBox_libfuse_maxFuseThreads = QSpinBox(self.verticalLayoutWidget) + self.spinBox_libfuse_maxFuseThreads.setObjectName(u'spinBox_libfuse_maxFuseThreads') + self.spinBox_libfuse_maxFuseThreads.setMaximum(2147483647) + self.spinBox_libfuse_maxFuseThreads.setSingleStep(20) + self.spinBox_libfuse_maxFuseThreads.setValue(128) + + self.horizontalLayout_2.addWidget(self.spinBox_libfuse_maxFuseThreads) + + + self.verticalLayout.addLayout(self.horizontalLayout_2) + + self.horizontalLayout_3 = QHBoxLayout() + self.horizontalLayout_3.setObjectName(u'horizontalLayout_3') + self.checkBox_libfuse_networkshare = QCheckBox(self.verticalLayoutWidget) + self.checkBox_libfuse_networkshare.setObjectName(u'checkBox_libfuse_networkshare') + + self.horizontalLayout_3.addWidget(self.checkBox_libfuse_networkshare) + + self.checkBox_libfuse_disableWriteback = QCheckBox(self.verticalLayoutWidget) + self.checkBox_libfuse_disableWriteback.setObjectName(u'checkBox_libfuse_disableWriteback') + + self.horizontalLayout_3.addWidget(self.checkBox_libfuse_disableWriteback) + + + self.verticalLayout.addLayout(self.horizontalLayout_3) + + + self.gridLayout.addWidget(self.groupBox_2, 3, 0, 1, 2) + + + self.retranslateUi(Form) + + self.button_resetDefaultSettings.setDefault(False) + + + QMetaObject.connectSlotsByName(Form) + # setupUi + + def retranslateUi(self, Form): + Form.setWindowTitle(QCoreApplication.translate('Form', u'Form', None)) +#if QT_CONFIG(tooltip) + self.button_resetDefaultSettings.setToolTip(QCoreApplication.translate('Form', u'

Reset to previous settings - does not take effect until changes are saved

', None)) +#endif // QT_CONFIG(tooltip) + self.button_resetDefaultSettings.setText(QCoreApplication.translate('Form', u'Reset Changes', None)) + self.button_okay.setText(QCoreApplication.translate('Form', u'Save', None)) + self.groupBox.setTitle(QCoreApplication.translate('Form', u'S3', None)) +#if QT_CONFIG(tooltip) + self.label.setToolTip(QCoreApplication.translate('Form', u'

The name of the subdirectory to be mounted instead of the whole bucket

', None)) +#endif // QT_CONFIG(tooltip) + self.label.setText(QCoreApplication.translate('Form', u'Sub-directory', None)) + self.groupbox_fileCache.setTitle(QCoreApplication.translate('Form', u'File Caching', None)) +#if QT_CONFIG(tooltip) + self.checkBox_fileCache_allowNonEmptyTmp.setToolTip(QCoreApplication.translate('Form', u'

Keep local file cache on unmount and remount (allow-non-empty-temp)

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_fileCache_allowNonEmptyTmp.setText(QCoreApplication.translate('Form', u'Persist File Cache', None)) +#if QT_CONFIG(tooltip) + self.checkBox_fileCache_policyLogs.setToolTip(QCoreApplication.translate('Form', u'

Generate eviction policy logs showing which files will expire soon

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_fileCache_policyLogs.setText(QCoreApplication.translate('Form', u'Policy Logs', None)) +#if QT_CONFIG(tooltip) + self.checkBox_fileCache_createEmptyFile.setToolTip(QCoreApplication.translate('Form', u'

Create an empty file on the container when create call is received from the kernel

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_fileCache_createEmptyFile.setText(QCoreApplication.translate('Form', u'Create Empty File', None)) +#if QT_CONFIG(tooltip) + self.checkBox_fileCache_cleanupStart.setToolTip(QCoreApplication.translate('Form', u'

Clean the temp directory on startup if it is not empty already

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_fileCache_cleanupStart.setText(QCoreApplication.translate('Form', u'Cleanup on Start', None)) +#if QT_CONFIG(tooltip) + self.checkBox_fileCache_offloadIO.setToolTip(QCoreApplication.translate('Form', u'

By default, the libfuse component will service reads/writes to files for better performance. Check the box to make the file-cache component service read/write calls as well.

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_fileCache_offloadIO.setText(QCoreApplication.translate('Form', u'Offload IO', None)) +#if QT_CONFIG(tooltip) + self.checkBox_fileCache_syncToFlush.setToolTip(QCoreApplication.translate('Form', u'

Sync call to a file will force upload of the contents to the storage account

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_fileCache_syncToFlush.setText(QCoreApplication.translate('Form', u'Sync to Flush', None)) +#if QT_CONFIG(tooltip) + self.label_15.setToolTip(QCoreApplication.translate('Form', u'

The amount of time (seconds) set to for eviction in the cache

', None)) +#endif // QT_CONFIG(tooltip) + self.label_15.setText(QCoreApplication.translate('Form', u'Eviction Timeout (s)', None)) +#if QT_CONFIG(tooltip) + self.label_16.setToolTip(QCoreApplication.translate('Form', u'

The number of files that can be evicted at once - default 5,000

', None)) +#endif // QT_CONFIG(tooltip) + self.label_16.setText(QCoreApplication.translate('Form', u'Max Eviction', None)) +#if QT_CONFIG(tooltip) + self.label_17.setToolTip(QCoreApplication.translate('Form', u'

The maximum cache size allowed in MB - set to zero for unlimited

', None)) +#endif // QT_CONFIG(tooltip) + self.label_17.setText(QCoreApplication.translate('Form', u'Max Cache Size (MB)', None)) +#if QT_CONFIG(tooltip) + self.label_18.setToolTip(QCoreApplication.translate('Form', u'

The percentage of disk space consumed when the eviction is triggers. This parameter overrides the eviction timeout parameter and cached files will be removed even if they have not expired.

', None)) +#endif // QT_CONFIG(tooltip) + self.label_18.setText(QCoreApplication.translate('Form', u'Eviction Max Threshold (%)', None)) +#if QT_CONFIG(tooltip) + self.label_19.setToolTip(QCoreApplication.translate('Form', u'

The percentage of disk space consumed which triggers the eviction to STOP evicting files when previously triggered by the high-threshold setting.

', None)) +#endif // QT_CONFIG(tooltip) + self.label_19.setText(QCoreApplication.translate('Form', u'Eviction Min Threshold (%)', None)) +#if QT_CONFIG(tooltip) + self.label_3.setToolTip(QCoreApplication.translate('Form', u"

The time (in seconds) between checks to see if a file in the local cache is up to date with the container's latest copy.

", None)) +#endif // QT_CONFIG(tooltip) + self.label_3.setText(QCoreApplication.translate('Form', u'Cache Update File Timeout(s)', None)) + self.dropDown_fileCache_evictionPolicy.setItemText(0, QCoreApplication.translate('Form', u'lru - least recently used', None)) + self.dropDown_fileCache_evictionPolicy.setItemText(1, QCoreApplication.translate('Form', u'lfu - least frequently used', None)) + + self.groupBox_2.setTitle(QCoreApplication.translate('Form', u'LibFuse', None)) +#if QT_CONFIG(tooltip) + self.label_2.setToolTip(QCoreApplication.translate('Form', u'

The number of threads allowed at the libfuse layer for highly parallel operations

', None)) +#endif // QT_CONFIG(tooltip) + self.label_2.setText(QCoreApplication.translate('Form', u'Maximum Fuse Threads', None)) +#if QT_CONFIG(tooltip) + self.checkBox_libfuse_networkshare.setToolTip(QCoreApplication.translate('Form', u"

Runs as a network share - may improve performance when latency to cloud is high.

ONLY supported on Windows.

", None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_libfuse_networkshare.setText(QCoreApplication.translate('Form', u'Enable Network-share', None)) +#if QT_CONFIG(tooltip) + self.checkBox_libfuse_disableWriteback.setToolTip(QCoreApplication.translate('Form', u'

Dis-allow libfuse to buffer write requests if one must stricty open files in write only or append mode. Alternatively, just set ignore open flags in general settings

', None)) +#endif // QT_CONFIG(tooltip) + self.checkBox_libfuse_disableWriteback.setText(QCoreApplication.translate('Form', u'Disable Write-back Cache', None)) + # retranslateUi diff --git a/setup/advancedConfig.yaml b/setup/advancedConfig.yaml index 55ac9e7ba..2c57c8a8c 100644 --- a/setup/advancedConfig.yaml +++ b/setup/advancedConfig.yaml @@ -27,7 +27,6 @@ # 10. 'sdk-trace' has been removed and setting log level to log_debug will auto enable these logs. # ----------------------------------------------------------------------------------------------------------------------- - # Daemon configuration foreground: true|false @@ -99,7 +98,7 @@ file_cache: path: # Optional - timeout-sec: + timeout-sec: max-eviction: max-size-mb: high-threshold: <% disk space consumed which triggers eviction. This parameter overrides 'timeout-sec' parameter and cached files will be removed even if they have not expired. Default - 80> @@ -128,7 +127,7 @@ loopbackfs: # Azure storage configuration azstorage: -# Required + # Required type: block|adls account-name: container: @@ -167,11 +166,11 @@ azstorage: virtual-directory: true|false disable-compression: true|false max-results-for-list: - telemetry : + telemetry: honour-acl: true|false cpk-enabled: true|false cpk-encryption-key: - cpk-encryption-key-sha256: + cpk-encryption-key-sha256: # S3 storage configuration s3storage: diff --git a/setup/baseConfig.yaml b/setup/baseConfig.yaml index 431abf162..99796c26f 100644 --- a/setup/baseConfig.yaml +++ b/setup/baseConfig.yaml @@ -27,7 +27,6 @@ # 10. 'sdk-trace' has been removed and setting log level to log_debug will auto enable these logs. # ----------------------------------------------------------------------------------------------------------------------- - # Daemon configuration foreground: true|false @@ -39,7 +38,7 @@ restricted-characters-windows: true|false + type: syslog|silent|base level: log_off|log_crit|log_err|log_warning|log_info|log_trace|log_debug file-path: max-file-size-mb: @@ -70,7 +69,7 @@ libfuse: max-fuse-threads: direct-io: true|false network-share: true|false - display-capacity-mb: + display-capacity-mb: # Streaming configuration stream: @@ -97,7 +96,7 @@ file_cache: path: # Optional - timeout-sec: + timeout-sec: max-eviction: max-size-mb: high-threshold: <% disk space consumed which triggers eviction. This parameter overrides 'timeout-sec' parameter and cached files will be removed even if they have not expired. Default - 80> @@ -126,7 +125,7 @@ loopbackfs: # Azure storage configuration azstorage: -# Required + # Required type: block|adls account-name: container: @@ -165,11 +164,11 @@ azstorage: virtual-directory: true|false disable-compression: true|false max-results-for-list: - telemetry : + telemetry: honour-acl: true|false cpk-enabled: true|false cpk-encryption-key: - cpk-encryption-key-sha256: + cpk-encryption-key-sha256: # S3 storage configuration s3storage: diff --git a/tools/health-monitor/main.go b/tools/health-monitor/main.go index 9abc96b37..48364f281 100644 --- a/tools/health-monitor/main.go +++ b/tools/health-monitor/main.go @@ -71,8 +71,8 @@ func main() { return } - err := log.SetDefaultLogger("syslog", common.LogConfig{ - Level: common.ELogLevel.LOG_DEBUG(), + err := log.SetDefaultLogger("base", common.LogConfig{ + Level: common.ELogLevel.LOG_WARNING(), FilePath: common.ExpandPath(hmcommon.DefaultLogFile), MaxFileSize: common.DefaultMaxLogFileSize, FileCount: common.DefaultLogFileCount, From 6d994bf8a289f6fdff7f6442732f9126ea0b9307 Mon Sep 17 00:00:00 2001 From: James Fantin-Hardesty <24646452+jfantinhardesty@users.noreply.github.com> Date: Wed, 9 Apr 2025 11:38:11 -0600 Subject: [PATCH 2/3] Fix test --- component/file_cache/file_cache_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/component/file_cache/file_cache_test.go b/component/file_cache/file_cache_test.go index 8a2e42d6a..2d365c1cd 100644 --- a/component/file_cache/file_cache_test.go +++ b/component/file_cache/file_cache_test.go @@ -163,7 +163,7 @@ func (suite *fileCacheTestSuite) TestEmpty() { suite.assert.False(suite.fileCache.createEmptyFile) suite.assert.False(suite.fileCache.allowNonEmpty) - suite.assert.EqualValues(suite.fileCache.cacheTimeout, 120) + suite.assert.EqualValues(suite.fileCache.cacheTimeout, 216000) suite.assert.False(suite.fileCache.cleanupOnStart) suite.assert.True(suite.fileCache.syncToFlush) } From 7c9cdabecdbb14f134f535e0b413b19b8f2ad4f9 Mon Sep 17 00:00:00 2001 From: James Fantin-Hardesty <24646452+jfantinhardesty@users.noreply.github.com> Date: Fri, 11 Apr 2025 16:55:30 -0600 Subject: [PATCH 3/3] Fix failing tests --- cmd/mount.go | 2 +- component/libfuse/libfuse_handler_test.go | 4 ++-- component/loopback/loopback_fs_test.go | 8 +++++++- doc/cloudfuse_mount.md | 2 +- doc/cloudfuse_mount_all.md | 4 ++-- doc/cloudfuse_mount_list.md | 2 +- internal/pipeline_test.go | 7 +++++++ 7 files changed, 21 insertions(+), 8 deletions(-) diff --git a/cmd/mount.go b/cmd/mount.go index 7f889ff8d..a9308cf56 100644 --- a/cmd/mount.go +++ b/cmd/mount.go @@ -678,7 +678,7 @@ func init() { mountCmd.PersistentFlags().StringVar(&options.PassPhrase, "passphrase", "", "Base64 encoded key to decrypt config file. Can also be specified by env-variable CLOUDFUSE_SECURE_CONFIG_PASSPHRASE.\n Decoded key length shall be 16 (AES-128), 24 (AES-192), or 32 (AES-256) bytes in length.") - mountCmd.PersistentFlags().String("log-type", "base", "Type of logger to be used by the system. Set to syslog by default. Allowed values are silent|syslog|base.") + mountCmd.PersistentFlags().String("log-type", "base", "Type of logger to be used by the system. Set to base by default. Allowed values are silent|syslog|base.") config.BindPFlag("logging.type", mountCmd.PersistentFlags().Lookup("log-type")) _ = mountCmd.RegisterFlagCompletionFunc("log-type", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { return []string{"silent", "base", "syslog"}, cobra.ShellCompDirectiveNoFileComp diff --git a/component/libfuse/libfuse_handler_test.go b/component/libfuse/libfuse_handler_test.go index 76f98f25c..7f1fa9def 100644 --- a/component/libfuse/libfuse_handler_test.go +++ b/component/libfuse/libfuse_handler_test.go @@ -49,7 +49,7 @@ func (suite *libfuseTestSuite) TestDefault() { suite.assert.Equal(uint32(120), suite.libfuse.entryExpiration) suite.assert.Equal(uint32(120), suite.libfuse.attributeExpiration) suite.assert.Equal(uint32(120), suite.libfuse.negativeTimeout) - suite.assert.Equal(uint64(1024*1024), suite.libfuse.displayCapacityMb) + suite.assert.Equal(uint64(1024*1024*1024), suite.libfuse.displayCapacityMb) suite.assert.False(suite.libfuse.disableWritebackCache) suite.assert.True(suite.libfuse.ignoreOpenFlags) suite.assert.False(suite.libfuse.directIO) @@ -97,7 +97,7 @@ func (suite *libfuseTestSuite) TestConfigZero() { suite.assert.Equal(uint32(0), suite.libfuse.entryExpiration) suite.assert.Equal(uint32(0), suite.libfuse.attributeExpiration) suite.assert.Equal(uint32(0), suite.libfuse.negativeTimeout) - suite.assert.Equal(uint64(1024*1024), suite.libfuse.displayCapacityMb) + suite.assert.Equal(uint64(1024*1024*1024), suite.libfuse.displayCapacityMb) suite.assert.False(suite.libfuse.directIO) } diff --git a/component/loopback/loopback_fs_test.go b/component/loopback/loopback_fs_test.go index 46f3d8013..250a9d80e 100644 --- a/component/loopback/loopback_fs_test.go +++ b/component/loopback/loopback_fs_test.go @@ -34,6 +34,7 @@ import ( "testing" "github.com/Seagate/cloudfuse/common" + "github.com/Seagate/cloudfuse/common/log" "github.com/Seagate/cloudfuse/internal" "github.com/stretchr/testify/assert" @@ -75,7 +76,12 @@ func (suite *LoopbackFSTestSuite) SetupTest() { suite.lfs = lfs.(*LoopbackFS) suite.lfs.path = testPath - err := os.MkdirAll(testPath, os.FileMode(0777)) + err := log.SetDefaultLogger("silent", common.LogConfig{}) + if err != nil { + panic(fmt.Sprintf("Unable to set silent logger as default: %v", err)) + } + + err = os.MkdirAll(testPath, os.FileMode(0777)) panicIfNotNil(err, "Failed to setup test directories") err = os.MkdirAll(filepath.Join(testPath, dirOne), os.FileMode(0777)) panicIfNotNil(err, "Failed to setup test directories") diff --git a/doc/cloudfuse_mount.md b/doc/cloudfuse_mount.md index 04e8aadcc..344eb68de 100644 --- a/doc/cloudfuse_mount.md +++ b/doc/cloudfuse_mount.md @@ -45,7 +45,7 @@ cloudfuse mount [flags] --lazy-write Async write to storage container after file handle is closed. --log-file-path string Configures the path for log files. Default is $HOME/.cloudfuse/cloudfuse.log (default "$HOME/.cloudfuse/cloudfuse.log") --log-level string Enables logs written to syslog. Set to LOG_WARNING by default. Allowed values are LOG_OFF|LOG_CRIT|LOG_ERR|LOG_WARNING|LOG_INFO|LOG_DEBUG (default "LOG_WARNING") - --log-type string Type of logger to be used by the system. Set to syslog by default. Allowed values are silent|syslog|base. (default "base") + --log-type string Type of logger to be used by the system. Set to base by default. Allowed values are silent|syslog|base. (default "base") --low-disk-threshold uint32 percentage of cache utilization which stops early eviction started by high-disk-threshold (default 80) --negative-timeout uint32 The negative entry timeout in seconds. --network-share Run as a network share. Only supported on Windows. diff --git a/doc/cloudfuse_mount_all.md b/doc/cloudfuse_mount_all.md index 8effbca93..d86c86090 100644 --- a/doc/cloudfuse_mount_all.md +++ b/doc/cloudfuse_mount_all.md @@ -50,7 +50,7 @@ cloudfuse mount all [flags] --lazy-write Async write to storage container after file handle is closed. --log-file-path string Configures the path for log files. Default is /$HOME/.cloudfuse/cloudfuse.log (default "$HOME/.cloudfuse/cloudfuse.log") --log-level string Enables logs written to syslog. Set to LOG_WARNING by default. Allowed values are LOG_OFF|LOG_CRIT|LOG_ERR|LOG_WARNING|LOG_INFO|LOG_DEBUG (default "LOG_WARNING") - --log-type string Type of logger to be used by the system. Set to syslog by default. Allowed values are silent|syslog|base. (default "base") + --log-type string Type of logger to be used by the system. Set to base by default. Allowed values are silent|syslog|base. (default "base") --low-disk-threshold uint32 percentage of cache utilization which stops early eviction started by high-disk-threshold (default 80) --negative-timeout uint32 The negative entry timeout in seconds. --network-share Run as a network share. Only supported on Windows. @@ -69,6 +69,6 @@ cloudfuse mount all [flags] ### SEE ALSO -* [cloudfuse mount](cloudfuse_mount.md) - Mount the container as a filesystem +* [cloudfuse mount](cloudfuse_mount.md) - Mount the container as a filesystem ###### Auto generated by spf13/cobra on 1-Nov-2024 diff --git a/doc/cloudfuse_mount_list.md b/doc/cloudfuse_mount_list.md index 9e3166505..683ab0acd 100644 --- a/doc/cloudfuse_mount_list.md +++ b/doc/cloudfuse_mount_list.md @@ -56,7 +56,7 @@ cloudfuse mount list --lazy-write Async write to storage container after file handle is closed. --log-file-path string Configures the path for log files. Default is $HOME/.cloudfuse/cloudfuse.log (default "$HOME/.cloudfuse/cloudfuse.log") --log-level string Enables logs written to syslog. Set to LOG_WARNING by default. Allowed values are LOG_OFF|LOG_CRIT|LOG_ERR|LOG_WARNING|LOG_INFO|LOG_DEBUG (default "LOG_WARNING") - --log-type string Type of logger to be used by the system. Set to syslog by default. Allowed values are silent|syslog|base. (default "base") + --log-type string Type of logger to be used by the system. Set to base by default. Allowed values are silent|syslog|base. (default "base") --low-disk-threshold uint32 percentage of cache utilization which stops early eviction started by high-disk-threshold (default 80) --negative-timeout uint32 The negative entry timeout in seconds. --network-share Run as a network share. Only supported on Windows. diff --git a/internal/pipeline_test.go b/internal/pipeline_test.go index 9936bba7d..35229de44 100644 --- a/internal/pipeline_test.go +++ b/internal/pipeline_test.go @@ -27,8 +27,11 @@ package internal import ( "context" + "fmt" "testing" + "github.com/Seagate/cloudfuse/common" + "github.com/Seagate/cloudfuse/common/log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" ) @@ -82,6 +85,10 @@ func (suite *pipelineTestSuite) SetupTest() { AddComponent("ComponentB", NewComponentB) AddComponent("ComponentC", NewComponentC) suite.assert = assert.New(suite.T()) + err := log.SetDefaultLogger("silent", common.LogConfig{}) + if err != nil { + panic(fmt.Sprintf("Unable to set silent logger as default: %v", err)) + } } func (s *pipelineTestSuite) TestCreatePipeline() {