azure - Subversion post-commit 错误:无法打开 rep-cache 数据库
问题描述
我已经使用此处描述的方法在 Azure Ubuntu 16.04 实例上安装了 Apache2/Subversion v1.9.3 。
我已经在 中配置了 SSL sites-available/[sitename].conf
,并且能够使用 Firefox 和 TortoiseSvn 进行远程连接。
如果我在服务器的本地文件系统上创建一个 repo,一切都会完美运行——我可以使用 TortoiseSvn 将文件导入 repo 而不会出错。
如果我将存储库替换为托管在 Azure Fileservice 存储上的存储库,并安装:
sudo mount -t cifs //[].file.core.windows.net/svn /mnt/svn -o vers=3.0,username=[],password=[],dir_mode=0777,file_mode=0777,sec=ntlmssp,uid=www-data,gid=www-data
...乌龟 SVN 报告post commit FS processing had error: Couldn't open rep-cache database
/var/log/apache/error.log
包含以下内容:
[Sat May 26 15:12:00.994705 2018] [:error] [pid 11577:tid 140074997974784] (20014)Internal error (specific information not available): [client 77.144.98.30:55324] Couldn't open rep-cache database
[Sat May 26 15:12:00.994745 2018] [:error] [pid 11577:tid 140074997974784] (20014)Internal error (specific information not available): [client 77.144.98.30:55324] -Couldn't perform atomic initialization
[Sat May 26 15:12:00.994749 2018] [:error] [pid 11577:tid 140074997974784] (20014)Internal error (specific information not available): [client 77.144.98.30:55324] -sqlite[S5]: database is locked, executing statement 'CREATE TABLE rep_cache ( hash TEXT NOT NULL PRIMARY KEY, revision INTEGER NOT NULL, offset INTEGER NOT NULL, size INTEGER NOT NULL, expanded_size INTEGER NOT NULL ); PRAGMA USER_VERSION = 1; '
[Sat May 26 15:12:02.713630 2018] [:error] [pid 11577:tid 140075207550720] (20014)Internal error (specific information not available): [client 77.144.98.30:55324] Couldn't open rep-cache database
[Sat May 26 15:12:02.713658 2018] [:error] [pid 11577:tid 140075207550720] (20014)Internal error (specific information not available): [client 77.144.98.30:55324] -Couldn't perform atomic initialization
[Sat May 26 15:12:02.867911 2018] [:error] [pid 11577:tid 140075207550720] (20014)Internal error (specific information not available): [client 77.144.98.30:55324] Couldn't open rep-cache database
[Sat May 26 15:12:02.867922 2018] [:error] [pid 11577:tid 140075207550720] (20014)Internal error (specific information not available): [client 77.144.98.30:55324] -Couldn't perform atomic initialization
[Sat May 26 15:12:03.801075 2018] [:error] [pid 11577:tid 140075207550720] (20014)Internal error (specific information not available): commit of r1 succeeded, but an error occurred after the commit: 'post commit FS processing had error:\nCouldn't open rep-cache database'
这个问题似乎解决了同样的问题,但是我不清楚是否可以修改 Apache2 中的模块加载顺序,因为模块配置基于mods-enabled/*.load
.
repo 目录中文件的权限似乎是合理的......尽管有相当多的零大小文件:
-rwxrwxrwx 1 www-data www-data 2 May 26 15:12 current
-rwxrwxrwx 1 www-data www-data 41 May 26 15:08 format
-rwxrwxrwx 1 www-data www-data 10178 May 26 15:08 fsfs.conf
-rwxrwxrwx 1 www-data www-data 5 May 26 15:08 fs-type
-rwxrwxrwx 1 www-data www-data 2 May 26 15:08 min-unpacked-rev
-rwxrwxrwx 1 www-data www-data 0 May 26 15:11 rep-cache.db
-rwxrwxrwx 1 www-data www-data 0 May 26 15:12 rep-cache.db-journal
drwxrwxrwx 2 www-data www-data 0 May 26 15:08 revprops
drwxrwxrwx 2 www-data www-data 0 May 26 15:08 revs
drwxrwxrwx 2 www-data www-data 0 May 26 15:08 transactions
-rwxrwxrwx 1 www-data www-data 2 May 26 15:11 txn-current
-rwxrwxrwx 1 www-data www-data 0 May 26 15:08 txn-current-lock
drwxrwxrwx 2 www-data www-data 0 May 26 15:08 txn-protorevs
-rwxrwxrwx 1 www-data www-data 74 May 26 15:08 uuid
-rwxrwxrwx 1 www-data www-data 0 May 26 15:08 write-lock
但是,如果模块加载顺序有问题,我想无论 repo 是在本地还是挂载的文件系统上都会出现问题。
这是在 Azure 中存储颠覆存储库数据的正确方法吗?
任何关于如何更好地诊断/解决问题的见解或指导都将受到欢迎。
解决方案
更多测试表明问题出在使用 Azure Fileservice 存储颠覆存储库数据。
设置中的过程之一是创建存储库:
sudo svnadmin create /path/to/repo
sudo chown -R www-data:www-data /path/to/repo
sudo chmod -R g+ws /path/to/repo
在本地(ext4?)驱动器上执行此操作时,db
目录如下所示:
-rw-rwSr-- 1 www-data www-data 2 May 26 18:56 current
-r--rwSr-- 1 www-data www-data 41 May 26 18:54 format
-rw-rwSr-- 1 www-data www-data 10178 May 26 18:54 fsfs.conf
-rw-rwSr-- 1 www-data www-data 5 May 26 18:54 fs-type
-rw-rwSr-- 1 www-data www-data 2 May 26 18:54 min-unpacked-rev
-rw-rwSr-- 1 www-data www-data 3072 May 26 18:56 rep-cache.db
-rw-rw-r-- 1 www-data www-data 0 May 26 18:56 rep-cache.db-journal
drwxrwsr-x 3 www-data www-data 4096 May 26 18:54 revprops
drwxrwsr-x 3 www-data www-data 4096 May 26 18:54 revs
drwxrwsr-x 2 www-data www-data 4096 May 26 18:56 transactions
-rw-rwSr-- 1 www-data www-data 2 May 26 18:56 txn-current
-rw-rwSr-- 1 www-data www-data 0 May 26 18:54 txn-current-lock
drwxrwsr-x 2 www-data www-data 4096 May 26 18:56 txn-protorevs
-rw-rwSr-- 1 www-data www-data 74 May 26 18:54 uuid
-rw-rwSr-- 1 www-data www-data 0 May 26 18:54 write-lock
...带有 s/S 标志的内容与 Azure 文件服务上的目录内容不同(如问题所示)。我不是 Linux 专家,我认为这些是Azure 文件服务不支持的功能。
因此,我的解决方案是创建一个数据磁盘并将其附加到 VM,然后对磁盘进行分区、格式化和挂载。然后可以按上述方式创建 repo,一切正常。
推荐阅读
- powershell - 用于匹配和替换部分匹配模式的 Powershell
- angular - 订阅 Angular 材料中 matTable 的 PageSize 和 PageIndex
- vim - 如何通过自动完成对话框
键而cword等于vim中的自动完成值? - c# - Visual Studio 中没有构建选项
- c# - linq 选择中的条件
- laravel - 在实时服务器上运行 composer install 时出现错误
- python - 我怎样才能有效地做到这一点?
- reactjs - 如何检测未使用的 css-modules 类
- javascript - 将 html 表转换为 mat 表(角度)
- c# - 有没有办法使用 C# 在 Visual Studio 中使面板缓慢移动?