Skip to content

codis: file /tmp/codis/data/codis3/codis-demo/topom already exists #1661

Description

@yaoyinnan

When deploying codis, the tmp file was not cleaned up due to abnormal exit, and it needs to be cleaned up manually. The path of the conflicting file is not indicated in the log. Since this file is used to mark a codis cluster, it cannot be directly overridden in code when duplicates are detected.

2023/06/29 20:04:05 main.go:171: [WARN] [0x1400012d200] dashboard online failed [13]
2023/06/29 20:04:07 fsclient.go:192: [WARN] fsclient - create /codis3/codis-demo/topom failed
2023/06/29 20:04:07 topom.go:189: [ERROR] store: acquire lock of codis-demo failed
[error]: file already exists
    4   /Users/yaoyinnan/Projects/WorkProjects/pika/codis/pkg/models/fs/fsclient.go:144
            pika/codis/v2/pkg/models/fs.(*Client).writeFile
    3   /Users/yaoyinnan/Projects/WorkProjects/pika/codis/pkg/models/fs/fsclient.go:191
            pika/codis/v2/pkg/models/fs.(*Client).Create
    2   /Users/yaoyinnan/Projects/WorkProjects/pika/codis/pkg/models/store.go:119
            pika/codis/v2/pkg/models.(*Store).Acquire
    1   /Users/yaoyinnan/Projects/WorkProjects/pika/codis/pkg/topom/topom.go:188
            pika/codis/v2/pkg/topom.(*Topom).Start
    0   /Users/yaoyinnan/Projects/WorkProjects/pika/codis/cmd/dashboard/main.go:169
            main.main
        ... ...

Modify it to the path of the exposed file in the log:

2023/06/29 20:06:52 topom.go:189: [ERROR] store: acquire lock of codis-demo failed
[error]: file /tmp/codis/data/codis3/codis-demo/topom already exists

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions