Giter Club home page Giter Club logo

Comments (7)

tdsparrow avatar tdsparrow commented on May 25, 2024 1

This issue only affect ceph after infernalis, which should be caused by librbd code change.
rbd_open didn't initialize image_wacher for ImageCtx. Later ImageCtx::notify_update uses the pointer and cause segfault.

from go-ceph.

dotnwat avatar dotnwat commented on May 25, 2024

I'm trying to get caught up on go-ceph issues, sorry about the delay. Do I understand correctly that the code works ok before infernalis and is broken after infernalis?

from go-ceph.

dotnwat avatar dotnwat commented on May 25, 2024

how hard would it be to provide a code snipper that reproduces the problem?

from go-ceph.

arthurtsang avatar arthurtsang commented on May 25, 2024

oh, i'm just using rdb-docker-plugin. didn't actually write the code.
and yes, it works with older version of cepth

from go-ceph.

david-z avatar david-z commented on May 25, 2024

@noahdesu you are right, this issue won't happen on hammer at least. I also met this issue when using rbd-docker-plugin on recent jewel release. I just made some comments on ceph/ceph#9660 and hope to fix this issue soon.

If you would like to reproduce it, here is a golang code snippet, but pls ensure rbd image is existed before you run this code.

package main

import (
        "github.com/ceph/go-ceph/rbd"
        "github.com/ceph/go-ceph/rados"
        "fmt"
)

func main() {
        fmt.Printf("test_librbd\n")

        conn, _ := rados.NewConn()
        conn.ReadDefaultConfigFile()
        conn.Connect()

        poolname := "rbd"
        ioctx, err := conn.OpenIOContext(poolname)
        if err != nil {
                fmt.Printf("open pool fails: %s\n", err)
                return
        }

        // ensure rbd image is existed already
        imagename := "rbd_image_1"
        img := rbd.GetImage(ioctx, imagename)

        err = img.Open(true)
        if err != nil {
                fmt.Printf("fail to open image: %s\n", err)
                return
        }
        defer img.Close()

        locker := "test_lock"
        err = img.LockExclusive(locker)
        if err != nil {
                fmt.Printf("fail to lock image: %s\n", err)
                return
        }
        fmt.Printf("lock done\n")

        err = img.Unlock(locker)
        if err != nil {
                fmt.Printf("fail to unlock image: %s\n", err)
                return
        }
        fmt.Printf("unlock done\n")
}

from go-ceph.

dotnwat avatar dotnwat commented on May 25, 2024

Perfect, thanks. That will make things much easier!

from go-ceph.

phlogistonjohn avatar phlogistonjohn commented on May 25, 2024

Hello, I'm automatically closing all issues filed prior to 2018 that have not been commented on recently. If this issue is still relevant to you please reopen the issue and restart the discussion. Thank you for your understanding.

from go-ceph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.