GithubHelp home page GithubHelp logo

openebs-archive / istgt Goto Github PK

View Code? Open in Web Editor NEW
23.0 26.0 72.0 1.59 MB

CAS Data Engine - iSCSI Target for OpenEBS cStor

Home Page: https://docs.openebs.io

License: Apache License 2.0

Makefile 1.13% Shell 5.93% M4 0.68% C 90.46% Perl 1.52% Dockerfile 0.28%
openebs kubernetes storage iscsi hacktoberfest

istgt's Introduction

Build Status FOSSA Status CII Best Practices Slack

Instructions to check cstyle

Checkout develop branch
Do ./cstyle.pl <filename with path>

Building

git checkout develop
sudo apt-get install libssl-dev docker.io
sudo apt-get install autoconf
./autogen.sh
./configure --enable-replication
make cstyle
make clean
make

Run target in a container on host network

Copy istgt.conf file to /tmp/cstor

sudo docker run -d --network=host -v /tmp/cstor:/tmp/cstor openebs/istgt:test /bin/bash ./init.sh volname=vol1 portal=10.128.0.2 path=/tmp/cstor size=10g externalIP=10.128.0.2

Run target as a binary on host network

Update volname, size, portal and externalIP in restart.sh

sh restart.sh

License

FOSSA Status

istgt's People

Contributors

15bcs019 avatar abhaygupta97 avatar abhilashshetty04 avatar aswathkk avatar bharathpgp avatar diegous avatar fossabot avatar gy741 avatar hppranaav avatar kmjayadeep avatar kmova avatar mynktl avatar nsathyaseelan avatar pawanpraka1 avatar payes avatar prateekpandey14 avatar rishabhp99 avatar rneha725 avatar rsiva911 avatar saideepd avatar satbirchhikara avatar shubham14bajpai avatar shubhambhattar avatar sushma-priyadharssini avatar thadc23 avatar utkarshmani1997 avatar uu1t avatar vishnuitta avatar wangzihao3 avatar yudaykiran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

istgt's Issues

Segmentation fault is seen upon resizing the storage size

Description

Upon modifying the LUN0 Storage in istgt.conf file, to reload modified configuration executed istgtcontrol refresh then segmentation fault is seen.

Expected Behavior

istgt should not crash

Steps to Reproduce

  • Run the istgt binary.
  • Modify the value of storage in /usr/local/etc/istgt/istgt.conf file
  • Execute the istgtcontrol refresh command to reload the configurations.

Logs of istgt
2019-02-11/12:13:40.023 main :3089: m#-1747536064.6923 : istgt:0.5.20121028:09:27:44:Feb 7 2019: starting

2019-02-11/12:13:40.023 main :3146: m#-1747536064.6923 : LU2 HDD UNIT
2019-02-11/12:13:40.024 istgt_lu_disk_init: 904: m#-1747536064.6923 : lu_disk_init LU2 TargetName=iqn.2016-09.com.openebs.cstor:vol1
LU2: LUN0 iqn.2016-09.com.openebs.cstor:vol1: storage_online [(null), 4GB.0MB, 1048576 blks of 4096 bytes, phy:0/3 WCE rpm:7200] q:128 thr:6/0 [0.0, 0.0]
LU2: LUN0 serial:4059aab98f093c5d95207f7af09d1413
2019-02-11/12:13:40.024 istgt_lu_disk_init:1337: m#-1747536064.6923 : LU2: LUN0 serial:4059aab98f093c5d95207f7af09d1413
2019-02-11/12:13:52.055 istgt_reload :2141: u#10.140606617675520: reload configuration#1 start

[istgt:0.5.20121028:09:27:44:Feb 7 2019]
2019-02-11/12:13:52.056 istgt_lu_disk_shut:1432: u#10.140606617675520: LU2: LUN0 iqn.2016-09.com.openebs.cstor:vol1: storage_offlinex [(null) 1048576 blocks, 4096 bytes/block] [0.0 0.0 0.0]

LU2 HDD UNIT
2019-02-11/12:13:52.056 istgt_lu_disk_init: 904: u#10.140606617675520: lu_disk_init LU2 TargetName=iqn.2016-09.com.openebs.cstor:vol1
LU2: LUN0 iqn.2016-09.com.openebs.cstor:vol1: storage_online [(null), 5GB.0MB, 1310720 blks of 4096 bytes, phy:0/3 WCE rpm:7200] q:128 thr:6/0 [0.0, 0.0]
2019-02-11/12:13:52.057 istgt_lu_disk_init:1327: u#10.140606617675520: LU2: LUN0 iqn.2016-09.com.openebs.cstor:vol1: storage_online [(null), 5GB.0MB, 1310720 blks of 4096 bytes, phy:0/3 WCE rpm:7200] q:128 thr:6/0 [0.0, 0.0]
LU2: LUN0 serial:4059aab98f093c5d95207f7af09d1413
2019-02-11/12:13:52.057 istgt_lu_disk_init:1337: u#10.140606617675520: LU2: LUN0 serial:4059aab98f093c5d95207f7af09d1413
2019-02-11/12:13:52.057 istgt_lu_reload_up:3325: u#10.140606617675520: update LU2: Name=iqn.2016-09.com.openebs.cstor:vol1
Fatal signal received: 11
Stack trace:
./istgt[0x40bd10]
/lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x7fe196c5b4b0]
./istgt[0x5a236c]
./istgt[0x5a367d]
./istgt[0x5936d1]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7fe19750b6ba]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7fe196d2d41d]
Segmentation fault (core dumped)

feat(test): Implement a tool to verify data consistency checks across the replicas.

What would you like to be added:

Why is this needed:
This is required to check the consistency across the replicas.

Describe the solution you'd like:
[A clear and concise description of what you want to happen]

  • We can make use of istgtcontrol utility to implement this.

Environment:

  • OpenEBS version:
  • Kubernetes version (use kubectl version):
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):

feat(test): Track memory leak (or) memory corruption issues

What would you like to be added:
It will help to fix memory issues/corruption in cstor-istgt.

Why is this needed:
Add a test case to track memory leak (or) corruption using Valgrind tool

Describe the solution you'd like:
[A clear and concise description of what you want to happen]

Environment:

  • OpenEBS version:
  • Kubernetes version (use kubectl version):
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):

Modularise istgt_lu_disk_execute(CONN_Ptr, ISTGT_LU_CMD_Ptr)

The following function istgt_lu_disk_execute(CONN_Ptr, ISTGT_LU_CMD_Ptr)https://github.com/openebs/istgt/blob/62d20a1ae272b4604359d47af06c1ff701f65033/src/istgt_lu_disk.c#L9072-L10923 can be refactored, which is a unit of 1537 lines of code.
Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Short Units of Code guideline rating!

Here's the gist of this guideline:

  • Definition ๐Ÿ“–
    Limit the length of code units to 15 lines of code.
  • Whyโ“
    Small units are easier to analyse, test and reuse.
  • How ๐Ÿ”ง
    When writing new units, don't let them grow above 15 lines of code. When a unit grows beyond this, split it in smaller units of no longer than 15 lines.

You can find more info about this guideline in Building Maintainable Software. ๐Ÿ“–

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.